From 078acb11f7346e9a1690ec61408df5573c7059b2 Mon Sep 17 00:00:00 2001 From: Jagan Prem Date: Thu, 11 Aug 2016 10:26:10 -0400 Subject: [PATCH 01/10] Add support for multline and multline*. --- lib/ast.js | 1 + lib/astutil.js | 11 + lib/parser.js | 2245 +++++++++++++++++++++++++++------------------- lib/parser.pegjs | 25 + lib/render.js | 4 + lib/texutil.js | 2 + 6 files changed, 1355 insertions(+), 933 deletions(-) diff --git a/lib/ast.js b/lib/ast.js index c3bc36a..9085fdc 100644 --- a/lib/ast.js +++ b/lib/ast.js @@ -163,6 +163,7 @@ var Tex = module.exports.Tex = new Enum( 'Tex', { FUN2sq: { args: [ 'string', 'self', 'self' ] }, FUN3: { args: [ 'string', 'self', 'self', 'self'] }, MATRIX: { args: [ 'string', [ [ [ 'self' ] ] ] ] }, + MULTLINE: { args: [ 'string', [ [ [ 'self' ] ] ] ] }, DECLh: { args: [ 'string', FontForce, [ 'self' ] ] }, JACOBI: { args: [ 'self', 'self', 'self', 'self']}, LAGUERRE1: { args:['self', 'self']}, diff --git a/lib/astutil.js b/lib/astutil.js index 1fddce3..07e74b1 100644 --- a/lib/astutil.js +++ b/lib/astutil.js @@ -196,6 +196,17 @@ ast.Tex.defineVisitor("contains_func", { match(target, '\\end{'+t+'}') || matrix_has(m); }, + MULTLINE: function(target, t, m) { + // \begin{env} .. \\ .. \\ .. \\ .. \end{env} + // t is the environment name. + // m is a one-dimensional array. + var expr_has = function(e) { return arr_contains_func(e, target); }; + var line_has = function(l) { return some(l, expr_has); }; + var lines_have = function(m) { return some(m, line_has); }; + return match(target, '\\begin{'+t+'}') || + match(target, '\\end{'+t+'}') || + lines_have(m); + }, LR: function(target, l, r, tl) { // \left\l tl1 tl2 tl3 ... \right\r (a balanced pair of delimiters) return match(target, '\\left') || match(target, '\\right') || diff --git a/lib/parser.js b/lib/parser.js index 5cac689..a1be205 100644 --- a/lib/parser.js +++ b/lib/parser.js @@ -177,20 +177,22 @@ module.exports = (function() { peg$c130 = function(m) { return ast.Tex.MATRIX("alignedat", lst2arr(m)); }, peg$c131 = function(m) { return ast.Tex.MATRIX("smallmatrix", lst2arr(m)); }, peg$c132 = function(m) { return ast.Tex.MATRIX("cases", lst2arr(m)); }, - peg$c133 = "\\begin{", - peg$c134 = { type: "literal", value: "\\begin{", description: "\"\\\\begin{\"" }, - peg$c135 = function() { throw new peg$SyntaxError("Illegal TeX function", [], text(), location()); }, - peg$c136 = function(f) { return !tu.all_functions[f]; }, - peg$c137 = function(f) { throw new peg$SyntaxError("Illegal TeX function", [], f, location()); }, - peg$c138 = function(f, l) { return ast.Tex.FUN1hl(f[0], f[1], l); }, - peg$c139 = function(f, l) { return ast.Tex.FUN1hf(f[0], f[1], l); }, - peg$c140 = function(f, l1, l2) { return ast.Tex.FUN2h(f[0], f[1], l1, l2); }, - peg$c141 = function(name, l1, l2, l3) { return options.semanticlatex; }, - peg$c142 = function(f) { throw new peg$SyntaxError("Illegal TeX function", [], text(), location()); }, - peg$c143 = function(l) { return ast.Tex.LITERAL(l); }, - peg$c144 = function(l) { return l; }, - peg$c145 = function(l) { return l;}, - peg$c146 = function(r) { + peg$c133 = function(m) { console.log("hi"); return ast.Tex.MULTLINE("multline", lst2arr(m)); }, + peg$c134 = function(m) { return ast.Tex.MULTLINE("multline*", lst2arr(m)); }, + peg$c135 = "\\begin{", + peg$c136 = { type: "literal", value: "\\begin{", description: "\"\\\\begin{\"" }, + peg$c137 = function() { throw new peg$SyntaxError("Illegal TeX function", [], text(), location()); }, + peg$c138 = function(f) { return !tu.all_functions[f]; }, + peg$c139 = function(f) { throw new peg$SyntaxError("Illegal TeX function", [], f, location()); }, + peg$c140 = function(f, l) { return ast.Tex.FUN1hl(f[0], f[1], l); }, + peg$c141 = function(f, l) { return ast.Tex.FUN1hf(f[0], f[1], l); }, + peg$c142 = function(f, l1, l2) { return ast.Tex.FUN2h(f[0], f[1], l1, l2); }, + peg$c143 = function(name, l1, l2, l3) { return options.semanticlatex; }, + peg$c144 = function(f) { throw new peg$SyntaxError("Illegal TeX function", [], text(), location()); }, + peg$c145 = function(l) { return ast.Tex.LITERAL(l); }, + peg$c146 = function(l) { return l; }, + peg$c147 = function(l) { return l;}, + peg$c148 = function(r) { var c = 0; var str = ""; str = r.join(""); @@ -204,263 +206,269 @@ module.exports = (function() { c = c + 1; } return ast.Tex.LITERAL(ast.RenderT.TEX_ONLY(str)); }, - peg$c147 = function() { return ast.Tex.LITERAL(ast.RenderT.TEX_ONLY("")); }, - peg$c148 = function(cs, m) { m.head[0].unshift(cs); return m; }, - peg$c149 = function(as, m) { m.head[0].unshift(as); return m; }, - peg$c150 = function(l, m) { return m; }, - peg$c151 = function(l, tail) { return { head: lst2arr(l), tail: tail }; }, - peg$c152 = function(f, l) { l.head.unshift(ast.Tex.LITERAL(ast.RenderT.TEX_ONLY(f + " "))); return l;}, - peg$c153 = function(e, l) { return l; }, - peg$c154 = function(e, tail) { return { head: e.toArray(), tail: tail }; }, - peg$c155 = function() { return text(); }, - peg$c156 = function(cs) { return ast.Tex.CURLY([ast.Tex.LITERAL(ast.RenderT.TEX_ONLY(cs))]); }, - peg$c157 = /^[lrc]/, - peg$c158 = { type: "class", value: "[lrc]", description: "[lrc]" }, - peg$c159 = "p", - peg$c160 = { type: "literal", value: "p", description: "\"p\"" }, - peg$c161 = "*", - peg$c162 = { type: "literal", value: "*", description: "\"*\"" }, - peg$c163 = /^[0-9]/, - peg$c164 = { type: "class", value: "[0-9]", description: "[0-9]" }, - peg$c165 = "||", - peg$c166 = { type: "literal", value: "||", description: "\"||\"" }, - peg$c167 = "|", - peg$c168 = { type: "literal", value: "|", description: "\"|\"" }, - peg$c169 = "@", - peg$c170 = { type: "literal", value: "@", description: "\"@\"" }, - peg$c171 = function(num) { return ast.Tex.CURLY([ast.Tex.LITERAL(ast.RenderT.TEX_ONLY(num))]); }, - peg$c172 = /^[tcb]/, - peg$c173 = { type: "class", value: "[tcb]", description: "[tcb]" }, - peg$c174 = /^[a-zA-Z]/, - peg$c175 = { type: "class", value: "[a-zA-Z]", description: "[a-zA-Z]" }, - peg$c176 = /^[,:;?!']/, - peg$c177 = { type: "class", value: "[,:;?!\\']", description: "[,:;?!\\']" }, - peg$c178 = /^[().]/, - peg$c179 = { type: "class", value: "[().]", description: "[().]" }, - peg$c180 = /^[\-+*=]/, - peg$c181 = { type: "class", value: "[-+*=]", description: "[-+*=]" }, - peg$c182 = /^[\/|]/, - peg$c183 = { type: "class", value: "[\\/|]", description: "[\\/|]" }, - peg$c184 = "-", - peg$c185 = { type: "literal", value: "-", description: "\"-\"" }, - peg$c186 = ".", - peg$c187 = { type: "literal", value: ".", description: "\".\"" }, - peg$c188 = "pt", - peg$c189 = { type: "literal", value: "pt", description: "\"pt\"" }, - peg$c190 = "pc", - peg$c191 = { type: "literal", value: "pc", description: "\"pc\"" }, - peg$c192 = "in", - peg$c193 = { type: "literal", value: "in", description: "\"in\"" }, - peg$c194 = "cm", - peg$c195 = { type: "literal", value: "cm", description: "\"cm\"" }, - peg$c196 = "bp", - peg$c197 = { type: "literal", value: "bp", description: "\"bp\"" }, - peg$c198 = "mm", - peg$c199 = { type: "literal", value: "mm", description: "\"mm\"" }, - peg$c200 = "dd", - peg$c201 = { type: "literal", value: "dd", description: "\"dd\"" }, - peg$c202 = "cc", - peg$c203 = { type: "literal", value: "cc", description: "\"cc\"" }, - peg$c204 = "sp", - peg$c205 = { type: "literal", value: "sp", description: "\"sp\"" }, - peg$c206 = "ex", - peg$c207 = { type: "literal", value: "ex", description: "\"ex\"" }, - peg$c208 = "em", - peg$c209 = { type: "literal", value: "em", description: "\"em\"" }, - peg$c210 = "mu", - peg$c211 = { type: "literal", value: "mu", description: "\"mu\"" }, - peg$c212 = "px", - peg$c213 = { type: "literal", value: "px", description: "\"px\"" }, - peg$c214 = /^[@]/, - peg$c215 = { type: "class", value: "[@]", description: "[@]" }, - peg$c216 = /^[\-0-9a-zA-Z+*,=():\/;?.!'` \x80-\uD7FF\uE000-\uFFFF]/, - peg$c217 = { type: "class", value: "[-0-9a-zA-Z+*,=():\\/;?.!\\'` \\x80-\\ud7ff\\ue000-\\uffff]", description: "[-0-9a-zA-Z+*,=():\\/;?.!\\'` \\x80-\\ud7ff\\ue000-\\uffff]" }, - peg$c218 = /^[\uD800-\uDBFF]/, - peg$c219 = { type: "class", value: "[\\ud800-\\udbff]", description: "[\\ud800-\\udbff]" }, - peg$c220 = /^[\uDC00-\uDFFF]/, - peg$c221 = { type: "class", value: "[\\udc00-\\udfff]", description: "[\\udc00-\\udfff]" }, - peg$c222 = function(l, h) { return text(); }, - peg$c223 = function(b) { return tu.box_functions[b]; }, - peg$c224 = function(b, cs) { return ast.Tex.BOX(b, cs.join('')); }, - peg$c225 = function(c) { return ast.RenderT.TEX_ONLY(c); }, - peg$c226 = function(f) { return tu.latex_function_names[f]; }, - peg$c227 = "(", - peg$c228 = { type: "literal", value: "(", description: "\"(\"" }, - peg$c229 = "\\{", - peg$c230 = { type: "literal", value: "\\{", description: "\"\\\\{\"" }, - peg$c231 = function(f) { return " ";}, - peg$c232 = function(f, c) { return ast.RenderT.TEX_ONLY(f + c); }, - peg$c233 = function(f) { return tu.mediawiki_function_names[f]; }, - peg$c234 = function(f) { return "";}, - peg$c235 = function(f, c) { return ast.RenderT.TEX_ONLY("\\operatorname{" + f.slice(1) + "}" + c); }, - peg$c236 = function(f) { return tu.other_literals1[f]; }, - peg$c237 = function(f) { return ast.RenderT.TEX_ONLY(f + " "); }, - peg$c238 = function(f) { return options.usemathrm && tu.other_literals2[f]; }, - peg$c239 = function(f) { return ast.RenderT.TEX_ONLY("\\mathrm{" + f + "} "); }, - peg$c240 = function(mathrm) { return options.usemathrm && mathrm === "\\mathrm"; }, - peg$c241 = function(mathrm, f) { return options.usemathrm && tu.other_literals2[f]; }, - peg$c242 = function(mathrm, f) { return options.usemathrm && ast.RenderT.TEX_ONLY("\\mathrm{" + f + "} "); }, - peg$c243 = function(f) { return tu.other_literals2[f]; }, - peg$c244 = function(f) { return ast.RenderT.TEX_ONLY("\\mbox{" + f + "} "); }, - peg$c245 = function(mbox) { return mbox === "\\mbox"; }, - peg$c246 = function(mbox, f) { return tu.other_literals2[f]; }, - peg$c247 = function(mbox, f) { return ast.RenderT.TEX_ONLY("\\mbox{" + f + "} "); }, - peg$c248 = function(f) { return ast.RenderT.TEX_ONLY(f); }, - peg$c249 = "\\", - peg$c250 = { type: "literal", value: "\\", description: "\"\\\\\"" }, - peg$c251 = /^[, ;!_#%$&]/, - peg$c252 = { type: "class", value: "[, ;!_#%$&]", description: "[, ;!_#%$&]" }, - peg$c253 = function(c) { return ast.RenderT.TEX_ONLY("\\" + c); }, - peg$c254 = /^[><~]/, - peg$c255 = { type: "class", value: "[><~]", description: "[><~]" }, - peg$c256 = /^[%$]/, - peg$c257 = { type: "class", value: "[%$]", description: "[%$]" }, - peg$c258 = function(c) { return ast.RenderT.TEX_ONLY("\\" + c); /* escape dangerous chars */}, - peg$c259 = function(f) { return ast.RenderT.TEX_ONLY(tu.other_literals3[f] + " "); }, - peg$c260 = /^[{}|]/, - peg$c261 = { type: "class", value: "[{}|]", description: "[{}|]" }, - peg$c262 = function(f) { return tu.other_delimiters1[f]; }, - peg$c263 = function(f) { return tu.other_delimiters2[f]; }, - peg$c264 = function(f) { var p = peg$parse(tu.other_delimiters2[f]); + peg$c149 = function() { return ast.Tex.LITERAL(ast.RenderT.TEX_ONLY("")); }, + peg$c150 = function(cs, m) { m.head[0].unshift(cs); return m; }, + peg$c151 = function(as, m) { m.head[0].unshift(as); return m; }, + peg$c152 = function(l, m) { return m; }, + peg$c153 = function(l, tail) { return { head: lst2arr(l), tail: tail }; }, + peg$c154 = function(f, l) { l.head.unshift(ast.Tex.LITERAL(ast.RenderT.TEX_ONLY(f + " "))); return l;}, + peg$c155 = function(e, l) { return l; }, + peg$c156 = function(e, tail) { return { head: e.toArray(), tail: tail }; }, + peg$c157 = function(f, m) { m.head.unshift(ast.Tex.LITERAL(ast.RenderT.TEX_ONLY(f + " "))); return m; }, + peg$c158 = function(e) { return { head: e.toArray(), tail: null }; }, + peg$c159 = function() { return text(); }, + peg$c160 = function(cs) { return ast.Tex.CURLY([ast.Tex.LITERAL(ast.RenderT.TEX_ONLY(cs))]); }, + peg$c161 = /^[lrc]/, + peg$c162 = { type: "class", value: "[lrc]", description: "[lrc]" }, + peg$c163 = "p", + peg$c164 = { type: "literal", value: "p", description: "\"p\"" }, + peg$c165 = "*", + peg$c166 = { type: "literal", value: "*", description: "\"*\"" }, + peg$c167 = /^[0-9]/, + peg$c168 = { type: "class", value: "[0-9]", description: "[0-9]" }, + peg$c169 = "||", + peg$c170 = { type: "literal", value: "||", description: "\"||\"" }, + peg$c171 = "|", + peg$c172 = { type: "literal", value: "|", description: "\"|\"" }, + peg$c173 = "@", + peg$c174 = { type: "literal", value: "@", description: "\"@\"" }, + peg$c175 = function(num) { return ast.Tex.CURLY([ast.Tex.LITERAL(ast.RenderT.TEX_ONLY(num))]); }, + peg$c176 = /^[tcb]/, + peg$c177 = { type: "class", value: "[tcb]", description: "[tcb]" }, + peg$c178 = /^[a-zA-Z]/, + peg$c179 = { type: "class", value: "[a-zA-Z]", description: "[a-zA-Z]" }, + peg$c180 = /^[,:;?!']/, + peg$c181 = { type: "class", value: "[,:;?!\\']", description: "[,:;?!\\']" }, + peg$c182 = /^[().]/, + peg$c183 = { type: "class", value: "[().]", description: "[().]" }, + peg$c184 = /^[\-+*=]/, + peg$c185 = { type: "class", value: "[-+*=]", description: "[-+*=]" }, + peg$c186 = /^[\/|]/, + peg$c187 = { type: "class", value: "[\\/|]", description: "[\\/|]" }, + peg$c188 = "-", + peg$c189 = { type: "literal", value: "-", description: "\"-\"" }, + peg$c190 = ".", + peg$c191 = { type: "literal", value: ".", description: "\".\"" }, + peg$c192 = "pt", + peg$c193 = { type: "literal", value: "pt", description: "\"pt\"" }, + peg$c194 = "pc", + peg$c195 = { type: "literal", value: "pc", description: "\"pc\"" }, + peg$c196 = "in", + peg$c197 = { type: "literal", value: "in", description: "\"in\"" }, + peg$c198 = "cm", + peg$c199 = { type: "literal", value: "cm", description: "\"cm\"" }, + peg$c200 = "bp", + peg$c201 = { type: "literal", value: "bp", description: "\"bp\"" }, + peg$c202 = "mm", + peg$c203 = { type: "literal", value: "mm", description: "\"mm\"" }, + peg$c204 = "dd", + peg$c205 = { type: "literal", value: "dd", description: "\"dd\"" }, + peg$c206 = "cc", + peg$c207 = { type: "literal", value: "cc", description: "\"cc\"" }, + peg$c208 = "sp", + peg$c209 = { type: "literal", value: "sp", description: "\"sp\"" }, + peg$c210 = "ex", + peg$c211 = { type: "literal", value: "ex", description: "\"ex\"" }, + peg$c212 = "em", + peg$c213 = { type: "literal", value: "em", description: "\"em\"" }, + peg$c214 = "mu", + peg$c215 = { type: "literal", value: "mu", description: "\"mu\"" }, + peg$c216 = "px", + peg$c217 = { type: "literal", value: "px", description: "\"px\"" }, + peg$c218 = /^[@]/, + peg$c219 = { type: "class", value: "[@]", description: "[@]" }, + peg$c220 = /^[\-0-9a-zA-Z+*,=():\/;?.!'` \x80-\uD7FF\uE000-\uFFFF]/, + peg$c221 = { type: "class", value: "[-0-9a-zA-Z+*,=():\\/;?.!\\'` \\x80-\\ud7ff\\ue000-\\uffff]", description: "[-0-9a-zA-Z+*,=():\\/;?.!\\'` \\x80-\\ud7ff\\ue000-\\uffff]" }, + peg$c222 = /^[\uD800-\uDBFF]/, + peg$c223 = { type: "class", value: "[\\ud800-\\udbff]", description: "[\\ud800-\\udbff]" }, + peg$c224 = /^[\uDC00-\uDFFF]/, + peg$c225 = { type: "class", value: "[\\udc00-\\udfff]", description: "[\\udc00-\\udfff]" }, + peg$c226 = function(l, h) { return text(); }, + peg$c227 = function(b) { return tu.box_functions[b]; }, + peg$c228 = function(b, cs) { return ast.Tex.BOX(b, cs.join('')); }, + peg$c229 = function(c) { return ast.RenderT.TEX_ONLY(c); }, + peg$c230 = function(f) { return tu.latex_function_names[f]; }, + peg$c231 = "(", + peg$c232 = { type: "literal", value: "(", description: "\"(\"" }, + peg$c233 = "\\{", + peg$c234 = { type: "literal", value: "\\{", description: "\"\\\\{\"" }, + peg$c235 = function(f) { return " ";}, + peg$c236 = function(f, c) { return ast.RenderT.TEX_ONLY(f + c); }, + peg$c237 = function(f) { return tu.mediawiki_function_names[f]; }, + peg$c238 = function(f) { return "";}, + peg$c239 = function(f, c) { return ast.RenderT.TEX_ONLY("\\operatorname{" + f.slice(1) + "}" + c); }, + peg$c240 = function(f) { return tu.other_literals1[f]; }, + peg$c241 = function(f) { return ast.RenderT.TEX_ONLY(f + " "); }, + peg$c242 = function(f) { return options.usemathrm && tu.other_literals2[f]; }, + peg$c243 = function(f) { return ast.RenderT.TEX_ONLY("\\mathrm{" + f + "} "); }, + peg$c244 = function(mathrm) { return options.usemathrm && mathrm === "\\mathrm"; }, + peg$c245 = function(mathrm, f) { return options.usemathrm && tu.other_literals2[f]; }, + peg$c246 = function(mathrm, f) { return options.usemathrm && ast.RenderT.TEX_ONLY("\\mathrm{" + f + "} "); }, + peg$c247 = function(f) { return tu.other_literals2[f]; }, + peg$c248 = function(f) { return ast.RenderT.TEX_ONLY("\\mbox{" + f + "} "); }, + peg$c249 = function(mbox) { return mbox === "\\mbox"; }, + peg$c250 = function(mbox, f) { return tu.other_literals2[f]; }, + peg$c251 = function(mbox, f) { return ast.RenderT.TEX_ONLY("\\mbox{" + f + "} "); }, + peg$c252 = function(f) { return ast.RenderT.TEX_ONLY(f); }, + peg$c253 = "\\", + peg$c254 = { type: "literal", value: "\\", description: "\"\\\\\"" }, + peg$c255 = /^[, ;!_#%$&]/, + peg$c256 = { type: "class", value: "[, ;!_#%$&]", description: "[, ;!_#%$&]" }, + peg$c257 = function(c) { return ast.RenderT.TEX_ONLY("\\" + c); }, + peg$c258 = /^[><~]/, + peg$c259 = { type: "class", value: "[><~]", description: "[><~]" }, + peg$c260 = /^[%$]/, + peg$c261 = { type: "class", value: "[%$]", description: "[%$]" }, + peg$c262 = function(c) { return ast.RenderT.TEX_ONLY("\\" + c); /* escape dangerous chars */}, + peg$c263 = function(f) { return ast.RenderT.TEX_ONLY(tu.other_literals3[f] + " "); }, + peg$c264 = /^[{}|]/, + peg$c265 = { type: "class", value: "[{}|]", description: "[{}|]" }, + peg$c266 = function(f) { return tu.other_delimiters1[f]; }, + peg$c267 = function(f) { return tu.other_delimiters2[f]; }, + peg$c268 = function(f) { var p = peg$parse(tu.other_delimiters2[f]); console.assert(Array.isArray(p) && p.length === 1); console.assert(p[0].constructor === ast.Tex.LITERAL); console.assert(p[0][0].constructor === ast.RenderT.TEX_ONLY); return p[0][0]; }, - peg$c265 = function(c) { return ast.RenderT.TEX_ONLY(""); }, - peg$c266 = function(f) { return tu.fun_ar1nb[f]; }, - peg$c267 = function(f) { return f; }, - peg$c268 = function(f) { return tu.fun_ar1opt[f]; }, - peg$c269 = "&", - peg$c270 = { type: "literal", value: "&", description: "\"&\"" }, - peg$c271 = "\\\\", - peg$c272 = { type: "literal", value: "\\\\", description: "\"\\\\\\\\\"" }, - peg$c273 = "\\begin", - peg$c274 = { type: "literal", value: "\\begin", description: "\"\\\\begin\"" }, - peg$c275 = "\\end", - peg$c276 = { type: "literal", value: "\\end", description: "\"\\\\end\"" }, - peg$c277 = "{matrix}", - peg$c278 = { type: "literal", value: "{matrix}", description: "\"{matrix}\"" }, - peg$c279 = "{pmatrix}", - peg$c280 = { type: "literal", value: "{pmatrix}", description: "\"{pmatrix}\"" }, - peg$c281 = "{bmatrix}", - peg$c282 = { type: "literal", value: "{bmatrix}", description: "\"{bmatrix}\"" }, - peg$c283 = "{Bmatrix}", - peg$c284 = { type: "literal", value: "{Bmatrix}", description: "\"{Bmatrix}\"" }, - peg$c285 = "{vmatrix}", - peg$c286 = { type: "literal", value: "{vmatrix}", description: "\"{vmatrix}\"" }, - peg$c287 = "{Vmatrix}", - peg$c288 = { type: "literal", value: "{Vmatrix}", description: "\"{Vmatrix}\"" }, - peg$c289 = "{array}", - peg$c290 = { type: "literal", value: "{array}", description: "\"{array}\"" }, - peg$c291 = "{align}", - peg$c292 = { type: "literal", value: "{align}", description: "\"{align}\"" }, - peg$c293 = "{aligned}", - peg$c294 = { type: "literal", value: "{aligned}", description: "\"{aligned}\"" }, - peg$c295 = "{alignat}", - peg$c296 = { type: "literal", value: "{alignat}", description: "\"{alignat}\"" }, - peg$c297 = "{alignedat}", - peg$c298 = { type: "literal", value: "{alignedat}", description: "\"{alignedat}\"" }, - peg$c299 = "{smallmatrix}", - peg$c300 = { type: "literal", value: "{smallmatrix}", description: "\"{smallmatrix}\"" }, - peg$c301 = "{cases}", - peg$c302 = { type: "literal", value: "{cases}", description: "\"{cases}\"" }, - peg$c303 = "\\big(", - peg$c304 = { type: "literal", value: "\\big(", description: "\"\\\\big(\"" }, - peg$c305 = "\\Big(", - peg$c306 = { type: "literal", value: "\\Big(", description: "\"\\\\Big(\"" }, - peg$c307 = "\\bigg(", - peg$c308 = { type: "literal", value: "\\bigg(", description: "\"\\\\bigg(\"" }, - peg$c309 = "\\Bigg(", - peg$c310 = { type: "literal", value: "\\Bigg(", description: "\"\\\\Bigg(\"" }, - peg$c311 = "\\bigl(", - peg$c312 = { type: "literal", value: "\\bigl(", description: "\"\\\\bigl(\"" }, - peg$c313 = "\\Bigl(", - peg$c314 = { type: "literal", value: "\\Bigl(", description: "\"\\\\Bigl(\"" }, - peg$c315 = "\\bigg1(", - peg$c316 = { type: "literal", value: "\\bigg1(", description: "\"\\\\bigg1(\"" }, - peg$c317 = "\\Biggl(", - peg$c318 = { type: "literal", value: "\\Biggl(", description: "\"\\\\Biggl(\"" }, - peg$c319 = "\\left(", - peg$c320 = { type: "literal", value: "\\left(", description: "\"\\\\left(\"" }, - peg$c321 = ")", - peg$c322 = { type: "literal", value: ")", description: "\")\"" }, - peg$c323 = "\\big)", - peg$c324 = { type: "literal", value: "\\big)", description: "\"\\\\big)\"" }, - peg$c325 = "\\Big)", - peg$c326 = { type: "literal", value: "\\Big)", description: "\"\\\\Big)\"" }, - peg$c327 = "\\bigg)", - peg$c328 = { type: "literal", value: "\\bigg)", description: "\"\\\\bigg)\"" }, - peg$c329 = "\\Bigg)", - peg$c330 = { type: "literal", value: "\\Bigg)", description: "\"\\\\Bigg)\"" }, - peg$c331 = "\\bigr)", - peg$c332 = { type: "literal", value: "\\bigr)", description: "\"\\\\bigr)\"" }, - peg$c333 = "\\Bigr)", - peg$c334 = { type: "literal", value: "\\Bigr)", description: "\"\\\\Bigr)\"" }, - peg$c335 = "\\biggr)", - peg$c336 = { type: "literal", value: "\\biggr)", description: "\"\\\\biggr)\"" }, - peg$c337 = "\\Biggr)", - peg$c338 = { type: "literal", value: "\\Biggr)", description: "\"\\\\Biggr)\"" }, - peg$c339 = "\\right)", - peg$c340 = { type: "literal", value: "\\right)", description: "\"\\\\right)\"" }, - peg$c341 = function(f) { return tu.big_literals[f]; }, - peg$c342 = function(f) { return tu.paren[f]; }, - peg$c343 = function(f) { return tu.fun_ar1[f]; }, - peg$c344 = function(f) { return tu.other_fun_ar1[f]; }, - peg$c345 = function(f) { return tu.fun_ar2[f]; }, - peg$c346 = function(f) { return tu.fun_ar3[f]; }, - peg$c347 = function(f) { return tu.fun_infix[f]; }, - peg$c348 = function(f) { return tu.jacobi[f]; }, - peg$c349 = function(f) { return tu.laguerre[f]; }, - peg$c350 = "sn", - peg$c351 = { type: "literal", value: "sn", description: "\"sn\"" }, - peg$c352 = "cn", - peg$c353 = { type: "literal", value: "cn", description: "\"cn\"" }, - peg$c354 = "dn", - peg$c355 = { type: "literal", value: "dn", description: "\"dn\"" }, - peg$c356 = function(f) { return tu.declh_function[f]; }, - peg$c357 = function(f) { return ast.Tex.DECLh(f, ast.FontForce.RM(), []); /*see bug 54818*/ }, - peg$c358 = function(f) { return tu.fun_ar2nb[f]; }, - peg$c359 = function(f) { return tu.left_function[f]; }, - peg$c360 = function(f) { return tu.right_function[f]; }, - peg$c361 = function(f) { return tu.hline_function[f]; }, - peg$c362 = function(f) { return tu.color_function[f]; }, - peg$c363 = function(f, cs) { return f + cs; }, - peg$c364 = function(f) { return tu.definecolor_function[f]; }, - peg$c365 = "named", - peg$c366 = { type: "literal", value: "named", description: "\"named\"" }, - peg$c367 = function(f, name, cs) { return "{named}" + cs; }, - peg$c368 = "gray", - peg$c369 = { type: "literal", value: "gray", description: "\"gray\"" }, - peg$c370 = function(f, name, cs) { return "{gray}" + cs; }, - peg$c371 = "rgb", - peg$c372 = { type: "literal", value: "rgb", description: "\"rgb\"" }, - peg$c373 = function(f, name, cs) { return "{rgb}" + cs; }, - peg$c374 = "RGB", - peg$c375 = { type: "literal", value: "RGB", description: "\"RGB\"" }, - peg$c376 = "cmyk", - peg$c377 = { type: "literal", value: "cmyk", description: "\"cmyk\"" }, - peg$c378 = function(f, name, cs) { return "{cmyk}" + cs; }, - peg$c379 = function(f, name, a) { return f + "{" + name.join('') + "}" + a; }, - peg$c380 = function(cs) { return "[named]" + cs; }, - peg$c381 = function(cs) { return "[gray]" + cs; }, - peg$c382 = function(cs) { return "[rgb]" + cs; }, - peg$c383 = function(cs) { return "[cmyk]" + cs; }, - peg$c384 = function(name) { return "{" + name.join('') + "}"; }, - peg$c385 = function(k) { return "{"+k+"}"; }, - peg$c386 = function(r, g, b) { return "{"+r+","+g+","+b+"}"; }, - peg$c387 = function(c, m, y, k) { return "{"+c+","+m+","+y+","+k+"}"; }, - peg$c388 = "0", - peg$c389 = { type: "literal", value: "0", description: "\"0\"" }, - peg$c390 = /^[1-9]/, - peg$c391 = { type: "class", value: "[1-9]", description: "[1-9]" }, - peg$c392 = function(n) { return parseInt(n, 10) <= 255; }, - peg$c393 = function(n) { return n / 255; }, - peg$c394 = function(n) { return n; }, - peg$c395 = /^[01]/, - peg$c396 = { type: "class", value: "[01]", description: "[01]" }, - peg$c397 = function() { return false; }, - peg$c398 = function() { return peg$currPos === input.length; }, + peg$c269 = function(c) { return ast.RenderT.TEX_ONLY(""); }, + peg$c270 = function(f) { return tu.fun_ar1nb[f]; }, + peg$c271 = function(f) { return f; }, + peg$c272 = function(f) { return tu.fun_ar1opt[f]; }, + peg$c273 = "&", + peg$c274 = { type: "literal", value: "&", description: "\"&\"" }, + peg$c275 = "\\\\", + peg$c276 = { type: "literal", value: "\\\\", description: "\"\\\\\\\\\"" }, + peg$c277 = "\\begin", + peg$c278 = { type: "literal", value: "\\begin", description: "\"\\\\begin\"" }, + peg$c279 = "\\end", + peg$c280 = { type: "literal", value: "\\end", description: "\"\\\\end\"" }, + peg$c281 = "{matrix}", + peg$c282 = { type: "literal", value: "{matrix}", description: "\"{matrix}\"" }, + peg$c283 = "{pmatrix}", + peg$c284 = { type: "literal", value: "{pmatrix}", description: "\"{pmatrix}\"" }, + peg$c285 = "{bmatrix}", + peg$c286 = { type: "literal", value: "{bmatrix}", description: "\"{bmatrix}\"" }, + peg$c287 = "{Bmatrix}", + peg$c288 = { type: "literal", value: "{Bmatrix}", description: "\"{Bmatrix}\"" }, + peg$c289 = "{vmatrix}", + peg$c290 = { type: "literal", value: "{vmatrix}", description: "\"{vmatrix}\"" }, + peg$c291 = "{Vmatrix}", + peg$c292 = { type: "literal", value: "{Vmatrix}", description: "\"{Vmatrix}\"" }, + peg$c293 = "{array}", + peg$c294 = { type: "literal", value: "{array}", description: "\"{array}\"" }, + peg$c295 = "{align}", + peg$c296 = { type: "literal", value: "{align}", description: "\"{align}\"" }, + peg$c297 = "{aligned}", + peg$c298 = { type: "literal", value: "{aligned}", description: "\"{aligned}\"" }, + peg$c299 = "{alignat}", + peg$c300 = { type: "literal", value: "{alignat}", description: "\"{alignat}\"" }, + peg$c301 = "{alignedat}", + peg$c302 = { type: "literal", value: "{alignedat}", description: "\"{alignedat}\"" }, + peg$c303 = "{smallmatrix}", + peg$c304 = { type: "literal", value: "{smallmatrix}", description: "\"{smallmatrix}\"" }, + peg$c305 = "{cases}", + peg$c306 = { type: "literal", value: "{cases}", description: "\"{cases}\"" }, + peg$c307 = "{multline}", + peg$c308 = { type: "literal", value: "{multline}", description: "\"{multline}\"" }, + peg$c309 = "{multline*}", + peg$c310 = { type: "literal", value: "{multline*}", description: "\"{multline*}\"" }, + peg$c311 = "\\big(", + peg$c312 = { type: "literal", value: "\\big(", description: "\"\\\\big(\"" }, + peg$c313 = "\\Big(", + peg$c314 = { type: "literal", value: "\\Big(", description: "\"\\\\Big(\"" }, + peg$c315 = "\\bigg(", + peg$c316 = { type: "literal", value: "\\bigg(", description: "\"\\\\bigg(\"" }, + peg$c317 = "\\Bigg(", + peg$c318 = { type: "literal", value: "\\Bigg(", description: "\"\\\\Bigg(\"" }, + peg$c319 = "\\bigl(", + peg$c320 = { type: "literal", value: "\\bigl(", description: "\"\\\\bigl(\"" }, + peg$c321 = "\\Bigl(", + peg$c322 = { type: "literal", value: "\\Bigl(", description: "\"\\\\Bigl(\"" }, + peg$c323 = "\\bigg1(", + peg$c324 = { type: "literal", value: "\\bigg1(", description: "\"\\\\bigg1(\"" }, + peg$c325 = "\\Biggl(", + peg$c326 = { type: "literal", value: "\\Biggl(", description: "\"\\\\Biggl(\"" }, + peg$c327 = "\\left(", + peg$c328 = { type: "literal", value: "\\left(", description: "\"\\\\left(\"" }, + peg$c329 = ")", + peg$c330 = { type: "literal", value: ")", description: "\")\"" }, + peg$c331 = "\\big)", + peg$c332 = { type: "literal", value: "\\big)", description: "\"\\\\big)\"" }, + peg$c333 = "\\Big)", + peg$c334 = { type: "literal", value: "\\Big)", description: "\"\\\\Big)\"" }, + peg$c335 = "\\bigg)", + peg$c336 = { type: "literal", value: "\\bigg)", description: "\"\\\\bigg)\"" }, + peg$c337 = "\\Bigg)", + peg$c338 = { type: "literal", value: "\\Bigg)", description: "\"\\\\Bigg)\"" }, + peg$c339 = "\\bigr)", + peg$c340 = { type: "literal", value: "\\bigr)", description: "\"\\\\bigr)\"" }, + peg$c341 = "\\Bigr)", + peg$c342 = { type: "literal", value: "\\Bigr)", description: "\"\\\\Bigr)\"" }, + peg$c343 = "\\biggr)", + peg$c344 = { type: "literal", value: "\\biggr)", description: "\"\\\\biggr)\"" }, + peg$c345 = "\\Biggr)", + peg$c346 = { type: "literal", value: "\\Biggr)", description: "\"\\\\Biggr)\"" }, + peg$c347 = "\\right)", + peg$c348 = { type: "literal", value: "\\right)", description: "\"\\\\right)\"" }, + peg$c349 = function(f) { return tu.big_literals[f]; }, + peg$c350 = function(f) { return tu.paren[f]; }, + peg$c351 = function(f) { return tu.fun_ar1[f]; }, + peg$c352 = function(f) { return tu.other_fun_ar1[f]; }, + peg$c353 = function(f) { return tu.fun_ar2[f]; }, + peg$c354 = function(f) { return tu.fun_ar3[f]; }, + peg$c355 = function(f) { return tu.fun_infix[f]; }, + peg$c356 = function(f) { return tu.jacobi[f]; }, + peg$c357 = function(f) { return tu.laguerre[f]; }, + peg$c358 = "sn", + peg$c359 = { type: "literal", value: "sn", description: "\"sn\"" }, + peg$c360 = "cn", + peg$c361 = { type: "literal", value: "cn", description: "\"cn\"" }, + peg$c362 = "dn", + peg$c363 = { type: "literal", value: "dn", description: "\"dn\"" }, + peg$c364 = function(f) { return tu.declh_function[f]; }, + peg$c365 = function(f) { return ast.Tex.DECLh(f, ast.FontForce.RM(), []); /*see bug 54818*/ }, + peg$c366 = function(f) { return tu.fun_ar2nb[f]; }, + peg$c367 = function(f) { return tu.left_function[f]; }, + peg$c368 = function(f) { return tu.right_function[f]; }, + peg$c369 = function(f) { return tu.hline_function[f]; }, + peg$c370 = function(f) { return tu.color_function[f]; }, + peg$c371 = function(f, cs) { return f + cs; }, + peg$c372 = function(f) { return tu.definecolor_function[f]; }, + peg$c373 = "named", + peg$c374 = { type: "literal", value: "named", description: "\"named\"" }, + peg$c375 = function(f, name, cs) { return "{named}" + cs; }, + peg$c376 = "gray", + peg$c377 = { type: "literal", value: "gray", description: "\"gray\"" }, + peg$c378 = function(f, name, cs) { return "{gray}" + cs; }, + peg$c379 = "rgb", + peg$c380 = { type: "literal", value: "rgb", description: "\"rgb\"" }, + peg$c381 = function(f, name, cs) { return "{rgb}" + cs; }, + peg$c382 = "RGB", + peg$c383 = { type: "literal", value: "RGB", description: "\"RGB\"" }, + peg$c384 = "cmyk", + peg$c385 = { type: "literal", value: "cmyk", description: "\"cmyk\"" }, + peg$c386 = function(f, name, cs) { return "{cmyk}" + cs; }, + peg$c387 = function(f, name, a) { return f + "{" + name.join('') + "}" + a; }, + peg$c388 = function(cs) { return "[named]" + cs; }, + peg$c389 = function(cs) { return "[gray]" + cs; }, + peg$c390 = function(cs) { return "[rgb]" + cs; }, + peg$c391 = function(cs) { return "[cmyk]" + cs; }, + peg$c392 = function(name) { return "{" + name.join('') + "}"; }, + peg$c393 = function(k) { return "{"+k+"}"; }, + peg$c394 = function(r, g, b) { return "{"+r+","+g+","+b+"}"; }, + peg$c395 = function(c, m, y, k) { return "{"+c+","+m+","+y+","+k+"}"; }, + peg$c396 = "0", + peg$c397 = { type: "literal", value: "0", description: "\"0\"" }, + peg$c398 = /^[1-9]/, + peg$c399 = { type: "class", value: "[1-9]", description: "[1-9]" }, + peg$c400 = function(n) { return parseInt(n, 10) <= 255; }, + peg$c401 = function(n) { return n / 255; }, + peg$c402 = function(n) { return n; }, + peg$c403 = /^[01]/, + peg$c404 = { type: "class", value: "[01]", description: "[01]" }, + peg$c405 = function() { return false; }, + peg$c406 = function() { return peg$currPos === input.length; }, peg$currPos = 0, peg$savedPos = 0, @@ -652,7 +660,7 @@ module.exports = (function() { function peg$parsestart() { var s0, s1, s2; - var key = peg$currPos * 115 + 0, + var key = peg$currPos * 121 + 0, cached = peg$resultsCache[key]; if (cached) { @@ -686,7 +694,7 @@ module.exports = (function() { function peg$parse_() { var s0, s1; - var key = peg$currPos * 115 + 1, + var key = peg$currPos * 121 + 1, cached = peg$resultsCache[key]; if (cached) { @@ -722,7 +730,7 @@ module.exports = (function() { function peg$parsespace() { var s0, s1, s2, s3, s4, s5, s6, s7, s8; - var key = peg$currPos * 115 + 2, + var key = peg$currPos * 121 + 2, cached = peg$resultsCache[key]; if (cached) { @@ -1112,7 +1120,7 @@ module.exports = (function() { function peg$parsetex_expr() { var s0, s1, s2, s3, s4; - var key = peg$currPos * 115 + 3, + var key = peg$currPos * 121 + 3, cached = peg$resultsCache[key]; if (cached) { @@ -1206,7 +1214,7 @@ module.exports = (function() { function peg$parseexpr() { var s0, s1; - var key = peg$currPos * 115 + 4, + var key = peg$currPos * 121 + 4, cached = peg$resultsCache[key]; if (cached) { @@ -1234,7 +1242,7 @@ module.exports = (function() { function peg$parsene_expr() { var s0, s1, s2; - var key = peg$currPos * 115 + 5, + var key = peg$currPos * 121 + 5, cached = peg$resultsCache[key]; if (cached) { @@ -1304,7 +1312,7 @@ module.exports = (function() { function peg$parselitsq_aq() { var s0; - var key = peg$currPos * 115 + 6, + var key = peg$currPos * 121 + 6, cached = peg$resultsCache[key]; if (cached) { @@ -1332,7 +1340,7 @@ module.exports = (function() { function peg$parselitsq_fq() { var s0, s1, s2, s3; - var key = peg$currPos * 115 + 7, + var key = peg$currPos * 121 + 7, cached = peg$resultsCache[key]; if (cached) { @@ -1396,7 +1404,7 @@ module.exports = (function() { function peg$parselitsq_uq() { var s0, s1, s2, s3; - var key = peg$currPos * 115 + 8, + var key = peg$currPos * 121 + 8, cached = peg$resultsCache[key]; if (cached) { @@ -1436,7 +1444,7 @@ module.exports = (function() { function peg$parselitsq_dq() { var s0, s1, s2, s3; - var key = peg$currPos * 115 + 9, + var key = peg$currPos * 121 + 9, cached = peg$resultsCache[key]; if (cached) { @@ -1476,7 +1484,7 @@ module.exports = (function() { function peg$parselitsq_zq() { var s0, s1; - var key = peg$currPos * 115 + 10, + var key = peg$currPos * 121 + 10, cached = peg$resultsCache[key]; if (cached) { @@ -1501,7 +1509,7 @@ module.exports = (function() { function peg$parseexpr_nosqc() { var s0, s1, s2; - var key = peg$currPos * 115 + 11, + var key = peg$currPos * 121 + 11, cached = peg$resultsCache[key]; if (cached) { @@ -1544,7 +1552,7 @@ module.exports = (function() { function peg$parselit_aq() { var s0; - var key = peg$currPos * 115 + 12, + var key = peg$currPos * 121 + 12, cached = peg$resultsCache[key]; if (cached) { @@ -1578,7 +1586,7 @@ module.exports = (function() { function peg$parselit_fq() { var s0, s1, s2, s3; - var key = peg$currPos * 115 + 13, + var key = peg$currPos * 121 + 13, cached = peg$resultsCache[key]; if (cached) { @@ -1666,7 +1674,7 @@ module.exports = (function() { function peg$parselit_uq() { var s0, s1, s2, s3; - var key = peg$currPos * 115 + 14, + var key = peg$currPos * 121 + 14, cached = peg$resultsCache[key]; if (cached) { @@ -1706,7 +1714,7 @@ module.exports = (function() { function peg$parselit_dq() { var s0, s1, s2, s3; - var key = peg$currPos * 115 + 15, + var key = peg$currPos * 121 + 15, cached = peg$resultsCache[key]; if (cached) { @@ -1746,7 +1754,7 @@ module.exports = (function() { function peg$parselit_uqn() { var s0, s1, s2; - var key = peg$currPos * 115 + 16, + var key = peg$currPos * 121 + 16, cached = peg$resultsCache[key]; if (cached) { @@ -1780,7 +1788,7 @@ module.exports = (function() { function peg$parselit_dqn() { var s0, s1, s2; - var key = peg$currPos * 115 + 17, + var key = peg$currPos * 121 + 17, cached = peg$resultsCache[key]; if (cached) { @@ -1814,7 +1822,7 @@ module.exports = (function() { function peg$parseleft() { var s0, s1, s2; - var key = peg$currPos * 115 + 18, + var key = peg$currPos * 121 + 18, cached = peg$resultsCache[key]; if (cached) { @@ -1866,7 +1874,7 @@ module.exports = (function() { function peg$parseright() { var s0, s1, s2; - var key = peg$currPos * 115 + 19, + var key = peg$currPos * 121 + 19, cached = peg$resultsCache[key]; if (cached) { @@ -1918,7 +1926,7 @@ module.exports = (function() { function peg$parselit() { var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, s14, s15, s16, s17, s18; - var key = peg$currPos * 115 + 20, + var key = peg$currPos * 121 + 20, cached = peg$resultsCache[key]; if (cached) { @@ -3479,35 +3487,14 @@ module.exports = (function() { } if (s0 === peg$FAILED) { s0 = peg$currPos; - if (input.substr(peg$currPos, 7) === peg$c133) { - s1 = peg$c133; - peg$currPos += 7; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c134); } - } + s1 = peg$parseBEGIN_MULTLINE(); if (s1 !== peg$FAILED) { - s2 = []; - s3 = peg$parsealpha(); - if (s3 !== peg$FAILED) { - while (s3 !== peg$FAILED) { - s2.push(s3); - s3 = peg$parsealpha(); - } - } else { - s2 = peg$FAILED; - } + s2 = peg$parsemultline(); if (s2 !== peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 125) { - s3 = peg$c37; - peg$currPos++; - } else { - s3 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c38); } - } + s3 = peg$parseEND_MULTLINE(); if (s3 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c135(); + s1 = peg$c133(s2); s0 = s1; } else { peg$currPos = s0; @@ -3523,19 +3510,19 @@ module.exports = (function() { } if (s0 === peg$FAILED) { s0 = peg$currPos; - s1 = peg$parsegeneric_func(); + s1 = peg$parseBEGIN_MULTLINE_STAR(); if (s1 !== peg$FAILED) { - peg$savedPos = peg$currPos; - s2 = peg$c136(s1); - if (s2) { - s2 = void 0; - } else { - s2 = peg$FAILED; - } + s2 = peg$parsemultline(); if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c137(s1); - s0 = s1; + s3 = peg$parseEND_MULTLINE_STAR(); + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c134(s2); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } } else { peg$currPos = s0; s0 = peg$FAILED; @@ -3544,6 +3531,75 @@ module.exports = (function() { peg$currPos = s0; s0 = peg$FAILED; } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.substr(peg$currPos, 7) === peg$c135) { + s1 = peg$c135; + peg$currPos += 7; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c136); } + } + if (s1 !== peg$FAILED) { + s2 = []; + s3 = peg$parsealpha(); + if (s3 !== peg$FAILED) { + while (s3 !== peg$FAILED) { + s2.push(s3); + s3 = peg$parsealpha(); + } + } else { + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 125) { + s3 = peg$c37; + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c38); } + } + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c137(); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parsegeneric_func(); + if (s1 !== peg$FAILED) { + peg$savedPos = peg$currPos; + s2 = peg$c138(s1); + if (s2) { + s2 = void 0; + } else { + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c139(s1); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + } } } } @@ -3597,7 +3653,7 @@ module.exports = (function() { function peg$parselitstuff() { var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, s14, s15, s16, s17, s18; - var key = peg$currPos * 115 + 21, + var key = peg$currPos * 121 + 21, cached = peg$resultsCache[key]; if (cached) { @@ -4392,7 +4448,7 @@ module.exports = (function() { s2 = peg$parselit(); if (s2 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c138(s1, s2); + s1 = peg$c140(s1, s2); s0 = s1; } else { peg$currPos = s0; @@ -4409,7 +4465,7 @@ module.exports = (function() { s2 = peg$parselit(); if (s2 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c139(s1, s2); + s1 = peg$c141(s1, s2); s0 = s1; } else { peg$currPos = s0; @@ -4474,7 +4530,7 @@ module.exports = (function() { s3 = peg$parselit(); if (s3 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c140(s1, s2, s3); + s1 = peg$c142(s1, s2, s3); s0 = s1; } else { peg$currPos = s0; @@ -4499,7 +4555,7 @@ module.exports = (function() { s4 = peg$parselit(); if (s4 !== peg$FAILED) { peg$savedPos = peg$currPos; - s5 = peg$c141(s1, s2, s3, s4); + s5 = peg$c143(s1, s2, s3, s4); if (s5) { s5 = void 0; } else { @@ -5182,35 +5238,14 @@ module.exports = (function() { } if (s0 === peg$FAILED) { s0 = peg$currPos; - if (input.substr(peg$currPos, 7) === peg$c133) { - s1 = peg$c133; - peg$currPos += 7; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c134); } - } + s1 = peg$parseBEGIN_MULTLINE(); if (s1 !== peg$FAILED) { - s2 = []; - s3 = peg$parsealpha(); - if (s3 !== peg$FAILED) { - while (s3 !== peg$FAILED) { - s2.push(s3); - s3 = peg$parsealpha(); - } - } else { - s2 = peg$FAILED; - } + s2 = peg$parsemultline(); if (s2 !== peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 125) { - s3 = peg$c37; - peg$currPos++; - } else { - s3 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c38); } - } + s3 = peg$parseEND_MULTLINE(); if (s3 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c135(); + s1 = peg$c133(s2); s0 = s1; } else { peg$currPos = s0; @@ -5226,19 +5261,19 @@ module.exports = (function() { } if (s0 === peg$FAILED) { s0 = peg$currPos; - s1 = peg$parsegeneric_func(); + s1 = peg$parseBEGIN_MULTLINE_STAR(); if (s1 !== peg$FAILED) { - peg$savedPos = peg$currPos; - s2 = peg$c136(s1); - if (s2) { - s2 = void 0; - } else { - s2 = peg$FAILED; - } + s2 = peg$parsemultline(); if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c142(s1); - s0 = s1; + s3 = peg$parseEND_MULTLINE_STAR(); + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c134(s2); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } } else { peg$currPos = s0; s0 = peg$FAILED; @@ -5249,12 +5284,81 @@ module.exports = (function() { } if (s0 === peg$FAILED) { s0 = peg$currPos; - s1 = peg$parseLITERALPART(); + if (input.substr(peg$currPos, 7) === peg$c135) { + s1 = peg$c135; + peg$currPos += 7; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c136); } + } if (s1 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c143(s1); + s2 = []; + s3 = peg$parsealpha(); + if (s3 !== peg$FAILED) { + while (s3 !== peg$FAILED) { + s2.push(s3); + s3 = peg$parsealpha(); + } + } else { + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 125) { + s3 = peg$c37; + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c38); } + } + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c137(); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parsegeneric_func(); + if (s1 !== peg$FAILED) { + peg$savedPos = peg$currPos; + s2 = peg$c138(s1); + if (s2) { + s2 = void 0; + } else { + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c144(s1); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseLITERALPART(); + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c145(s1); + } + s0 = s1; + } } - s0 = s1; } } } @@ -5309,7 +5413,7 @@ module.exports = (function() { function peg$parselitparen1() { var s0, s1, s2, s3, s4, s5; - var key = peg$currPos * 115 + 22, + var key = peg$currPos * 121 + 22, cached = peg$resultsCache[key]; if (cached) { @@ -5342,7 +5446,7 @@ module.exports = (function() { } if (s5 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c144(s3); + s1 = peg$c146(s3); s0 = s1; } else { peg$currPos = s0; @@ -5369,7 +5473,7 @@ module.exports = (function() { s1 = peg$parselitparen(); if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c144(s1); + s1 = peg$c146(s1); } s0 = s1; } @@ -5382,7 +5486,7 @@ module.exports = (function() { function peg$parselitparen() { var s0, s1, s2, s3, s4, s5; - var key = peg$currPos * 115 + 23, + var key = peg$currPos * 121 + 23, cached = peg$resultsCache[key]; if (cached) { @@ -5403,7 +5507,7 @@ module.exports = (function() { s5 = peg$parsePAREN_CLOSE(); if (s5 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c145(s3); + s1 = peg$c147(s3); s0 = s1; } else { peg$currPos = s0; @@ -5434,7 +5538,7 @@ module.exports = (function() { function peg$parselitplus() { var s0, s1, s2; - var key = peg$currPos * 115 + 24, + var key = peg$currPos * 121 + 24, cached = peg$resultsCache[key]; if (cached) { @@ -5447,7 +5551,7 @@ module.exports = (function() { s1 = peg$parselitstuff(); if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c144(s1); + s1 = peg$c146(s1); } s0 = s1; if (s0 === peg$FAILED) { @@ -5464,7 +5568,7 @@ module.exports = (function() { } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c146(s1); + s1 = peg$c148(s1); } s0 = s1; if (s0 === peg$FAILED) { @@ -5472,7 +5576,7 @@ module.exports = (function() { s1 = peg$c50; if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c147(); + s1 = peg$c149(); } s0 = s1; } @@ -5486,7 +5590,7 @@ module.exports = (function() { function peg$parsearray() { var s0, s1, s2; - var key = peg$currPos * 115 + 25, + var key = peg$currPos * 121 + 25, cached = peg$resultsCache[key]; if (cached) { @@ -5501,7 +5605,7 @@ module.exports = (function() { s2 = peg$parsematrix(); if (s2 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c148(s1, s2); + s1 = peg$c150(s1, s2); s0 = s1; } else { peg$currPos = s0; @@ -5520,7 +5624,7 @@ module.exports = (function() { function peg$parsealignat() { var s0, s1, s2; - var key = peg$currPos * 115 + 26, + var key = peg$currPos * 121 + 26, cached = peg$resultsCache[key]; if (cached) { @@ -5535,7 +5639,7 @@ module.exports = (function() { s2 = peg$parsematrix(); if (s2 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c149(s1, s2); + s1 = peg$c151(s1, s2); s0 = s1; } else { peg$currPos = s0; @@ -5554,7 +5658,7 @@ module.exports = (function() { function peg$parsematrix() { var s0, s1, s2, s3, s4; - var key = peg$currPos * 115 + 27, + var key = peg$currPos * 121 + 27, cached = peg$resultsCache[key]; if (cached) { @@ -5572,7 +5676,7 @@ module.exports = (function() { s4 = peg$parsematrix(); if (s4 !== peg$FAILED) { peg$savedPos = s2; - s3 = peg$c150(s1, s4); + s3 = peg$c152(s1, s4); s2 = s3; } else { peg$currPos = s2; @@ -5587,7 +5691,7 @@ module.exports = (function() { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c151(s1, s2); + s1 = peg$c153(s1, s2); s0 = s1; } else { peg$currPos = s0; @@ -5606,7 +5710,7 @@ module.exports = (function() { function peg$parseline_start() { var s0, s1, s2; - var key = peg$currPos * 115 + 28, + var key = peg$currPos * 121 + 28, cached = peg$resultsCache[key]; if (cached) { @@ -5621,7 +5725,7 @@ module.exports = (function() { s2 = peg$parseline_start(); if (s2 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c152(s1, s2); + s1 = peg$c154(s1, s2); s0 = s1; } else { peg$currPos = s0; @@ -5643,7 +5747,7 @@ module.exports = (function() { function peg$parseline() { var s0, s1, s2, s3, s4; - var key = peg$currPos * 115 + 29, + var key = peg$currPos * 121 + 29, cached = peg$resultsCache[key]; if (cached) { @@ -5661,7 +5765,7 @@ module.exports = (function() { s4 = peg$parseline(); if (s4 !== peg$FAILED) { peg$savedPos = s2; - s3 = peg$c153(s1, s4); + s3 = peg$c155(s1, s4); s2 = s3; } else { peg$currPos = s2; @@ -5676,7 +5780,93 @@ module.exports = (function() { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c154(s1, s2); + s1 = peg$c156(s1, s2); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + function peg$parsemultline() { + var s0, s1, s2, s3, s4; + + var key = peg$currPos * 121 + 30, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + s0 = peg$currPos; + s1 = peg$parsemline_start(); + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + s3 = peg$parseNEXT_ROW(); + if (s3 !== peg$FAILED) { + s4 = peg$parsemultline(); + if (s4 !== peg$FAILED) { + peg$savedPos = s2; + s3 = peg$c152(s1, s4); + s2 = s3; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 === peg$FAILED) { + s2 = null; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c153(s1, s2); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + function peg$parsemline_start() { + var s0, s1, s2; + + var key = peg$currPos * 121 + 31, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + s0 = peg$currPos; + s1 = peg$parseHLINE(); + if (s1 !== peg$FAILED) { + s2 = peg$parsemline_start(); + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c157(s1, s2); s0 = s1; } else { peg$currPos = s0; @@ -5686,6 +5876,15 @@ module.exports = (function() { peg$currPos = s0; s0 = peg$FAILED; } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseexpr(); + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c158(s1); + } + s0 = s1; + } peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; @@ -5695,7 +5894,7 @@ module.exports = (function() { function peg$parsecolumn_spec() { var s0, s1, s2, s3, s4; - var key = peg$currPos * 115 + 30, + var key = peg$currPos * 121 + 32, cached = peg$resultsCache[key]; if (cached) { @@ -5720,14 +5919,14 @@ module.exports = (function() { } if (s3 !== peg$FAILED) { peg$savedPos = s2; - s3 = peg$c155(); + s3 = peg$c159(); } s2 = s3; if (s2 !== peg$FAILED) { s3 = peg$parseCURLY_CLOSE(); if (s3 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c156(s2); + s1 = peg$c160(s2); s0 = s1; } else { peg$currPos = s0; @@ -5750,7 +5949,7 @@ module.exports = (function() { function peg$parseone_col() { var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9; - var key = peg$currPos * 115 + 31, + var key = peg$currPos * 121 + 33, cached = peg$resultsCache[key]; if (cached) { @@ -5760,12 +5959,12 @@ module.exports = (function() { } s0 = peg$currPos; - if (peg$c157.test(input.charAt(peg$currPos))) { + if (peg$c161.test(input.charAt(peg$currPos))) { s1 = input.charAt(peg$currPos); peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c158); } + if (peg$silentFails === 0) { peg$fail(peg$c162); } } if (s1 !== peg$FAILED) { s2 = peg$parse_(); @@ -5783,11 +5982,11 @@ module.exports = (function() { if (s0 === peg$FAILED) { s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 112) { - s1 = peg$c159; + s1 = peg$c163; peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c160); } + if (peg$silentFails === 0) { peg$fail(peg$c164); } } if (s1 !== peg$FAILED) { s2 = peg$parseCURLY_OPEN(); @@ -5826,32 +6025,32 @@ module.exports = (function() { if (s0 === peg$FAILED) { s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 42) { - s1 = peg$c161; + s1 = peg$c165; peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c162); } + if (peg$silentFails === 0) { peg$fail(peg$c166); } } if (s1 !== peg$FAILED) { s2 = peg$parseCURLY_OPEN(); if (s2 !== peg$FAILED) { s3 = []; - if (peg$c163.test(input.charAt(peg$currPos))) { + if (peg$c167.test(input.charAt(peg$currPos))) { s4 = input.charAt(peg$currPos); peg$currPos++; } else { s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c164); } + if (peg$silentFails === 0) { peg$fail(peg$c168); } } if (s4 !== peg$FAILED) { while (s4 !== peg$FAILED) { s3.push(s4); - if (peg$c163.test(input.charAt(peg$currPos))) { + if (peg$c167.test(input.charAt(peg$currPos))) { s4 = input.charAt(peg$currPos); peg$currPos++; } else { s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c164); } + if (peg$silentFails === 0) { peg$fail(peg$c168); } } } } else { @@ -5924,12 +6123,12 @@ module.exports = (function() { } if (s0 === peg$FAILED) { s0 = peg$currPos; - if (input.substr(peg$currPos, 2) === peg$c165) { - s1 = peg$c165; + if (input.substr(peg$currPos, 2) === peg$c169) { + s1 = peg$c169; peg$currPos += 2; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c166); } + if (peg$silentFails === 0) { peg$fail(peg$c170); } } if (s1 !== peg$FAILED) { s2 = peg$parse_(); @@ -5947,11 +6146,11 @@ module.exports = (function() { if (s0 === peg$FAILED) { s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 124) { - s1 = peg$c167; + s1 = peg$c171; peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c168); } + if (peg$silentFails === 0) { peg$fail(peg$c172); } } if (s1 !== peg$FAILED) { s2 = peg$parse_(); @@ -5969,11 +6168,11 @@ module.exports = (function() { if (s0 === peg$FAILED) { s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 64) { - s1 = peg$c169; + s1 = peg$c173; peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c170); } + if (peg$silentFails === 0) { peg$fail(peg$c174); } } if (s1 !== peg$FAILED) { s2 = peg$parse_(); @@ -6029,7 +6228,7 @@ module.exports = (function() { function peg$parsealignat_spec() { var s0, s1, s2, s3, s4; - var key = peg$currPos * 115 + 32, + var key = peg$currPos * 121 + 34, cached = peg$resultsCache[key]; if (cached) { @@ -6043,22 +6242,22 @@ module.exports = (function() { if (s1 !== peg$FAILED) { s2 = peg$currPos; s3 = []; - if (peg$c163.test(input.charAt(peg$currPos))) { + if (peg$c167.test(input.charAt(peg$currPos))) { s4 = input.charAt(peg$currPos); peg$currPos++; } else { s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c164); } + if (peg$silentFails === 0) { peg$fail(peg$c168); } } if (s4 !== peg$FAILED) { while (s4 !== peg$FAILED) { s3.push(s4); - if (peg$c163.test(input.charAt(peg$currPos))) { + if (peg$c167.test(input.charAt(peg$currPos))) { s4 = input.charAt(peg$currPos); peg$currPos++; } else { s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c164); } + if (peg$silentFails === 0) { peg$fail(peg$c168); } } } } else { @@ -6066,7 +6265,7 @@ module.exports = (function() { } if (s3 !== peg$FAILED) { peg$savedPos = s2; - s3 = peg$c155(); + s3 = peg$c159(); } s2 = s3; if (s2 !== peg$FAILED) { @@ -6075,7 +6274,7 @@ module.exports = (function() { s4 = peg$parseCURLY_CLOSE(); if (s4 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c171(s2); + s1 = peg$c175(s2); s0 = s1; } else { peg$currPos = s0; @@ -6102,7 +6301,7 @@ module.exports = (function() { function peg$parseopt_pos() { var s0, s1, s2, s3, s4, s5, s6; - var key = peg$currPos * 115 + 33, + var key = peg$currPos * 121 + 35, cached = peg$resultsCache[key]; if (cached) { @@ -6122,12 +6321,12 @@ module.exports = (function() { if (s1 !== peg$FAILED) { s2 = peg$parse_(); if (s2 !== peg$FAILED) { - if (peg$c172.test(input.charAt(peg$currPos))) { + if (peg$c176.test(input.charAt(peg$currPos))) { s3 = input.charAt(peg$currPos); peg$currPos++; } else { s3 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c173); } + if (peg$silentFails === 0) { peg$fail(peg$c177); } } if (s3 !== peg$FAILED) { s4 = peg$parse_(); @@ -6180,7 +6379,7 @@ module.exports = (function() { function peg$parsealpha() { var s0; - var key = peg$currPos * 115 + 34, + var key = peg$currPos * 121 + 36, cached = peg$resultsCache[key]; if (cached) { @@ -6189,12 +6388,12 @@ module.exports = (function() { return cached.result; } - if (peg$c174.test(input.charAt(peg$currPos))) { + if (peg$c178.test(input.charAt(peg$currPos))) { s0 = input.charAt(peg$currPos); peg$currPos++; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c175); } + if (peg$silentFails === 0) { peg$fail(peg$c179); } } peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; @@ -6205,7 +6404,7 @@ module.exports = (function() { function peg$parseliteral_id() { var s0; - var key = peg$currPos * 115 + 35, + var key = peg$currPos * 121 + 37, cached = peg$resultsCache[key]; if (cached) { @@ -6214,12 +6413,12 @@ module.exports = (function() { return cached.result; } - if (peg$c174.test(input.charAt(peg$currPos))) { + if (peg$c178.test(input.charAt(peg$currPos))) { s0 = input.charAt(peg$currPos); peg$currPos++; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c175); } + if (peg$silentFails === 0) { peg$fail(peg$c179); } } peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; @@ -6230,7 +6429,7 @@ module.exports = (function() { function peg$parseliteral_mn() { var s0; - var key = peg$currPos * 115 + 36, + var key = peg$currPos * 121 + 38, cached = peg$resultsCache[key]; if (cached) { @@ -6239,12 +6438,12 @@ module.exports = (function() { return cached.result; } - if (peg$c163.test(input.charAt(peg$currPos))) { + if (peg$c167.test(input.charAt(peg$currPos))) { s0 = input.charAt(peg$currPos); peg$currPos++; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c164); } + if (peg$silentFails === 0) { peg$fail(peg$c168); } } peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; @@ -6255,7 +6454,7 @@ module.exports = (function() { function peg$parseliteral_uf_lt() { var s0; - var key = peg$currPos * 115 + 37, + var key = peg$currPos * 121 + 39, cached = peg$resultsCache[key]; if (cached) { @@ -6264,12 +6463,12 @@ module.exports = (function() { return cached.result; } - if (peg$c176.test(input.charAt(peg$currPos))) { + if (peg$c180.test(input.charAt(peg$currPos))) { s0 = input.charAt(peg$currPos); peg$currPos++; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c177); } + if (peg$silentFails === 0) { peg$fail(peg$c181); } } peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; @@ -6280,7 +6479,7 @@ module.exports = (function() { function peg$parsedelimiter_uf_lt() { var s0; - var key = peg$currPos * 115 + 38, + var key = peg$currPos * 121 + 40, cached = peg$resultsCache[key]; if (cached) { @@ -6289,12 +6488,12 @@ module.exports = (function() { return cached.result; } - if (peg$c178.test(input.charAt(peg$currPos))) { + if (peg$c182.test(input.charAt(peg$currPos))) { s0 = input.charAt(peg$currPos); peg$currPos++; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c179); } + if (peg$silentFails === 0) { peg$fail(peg$c183); } } peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; @@ -6305,7 +6504,7 @@ module.exports = (function() { function peg$parseliteral_uf_op() { var s0; - var key = peg$currPos * 115 + 39, + var key = peg$currPos * 121 + 41, cached = peg$resultsCache[key]; if (cached) { @@ -6314,12 +6513,12 @@ module.exports = (function() { return cached.result; } - if (peg$c180.test(input.charAt(peg$currPos))) { + if (peg$c184.test(input.charAt(peg$currPos))) { s0 = input.charAt(peg$currPos); peg$currPos++; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c181); } + if (peg$silentFails === 0) { peg$fail(peg$c185); } } peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; @@ -6330,7 +6529,7 @@ module.exports = (function() { function peg$parsedelimiter_uf_op() { var s0; - var key = peg$currPos * 115 + 40, + var key = peg$currPos * 121 + 42, cached = peg$resultsCache[key]; if (cached) { @@ -6339,12 +6538,12 @@ module.exports = (function() { return cached.result; } - if (peg$c182.test(input.charAt(peg$currPos))) { + if (peg$c186.test(input.charAt(peg$currPos))) { s0 = input.charAt(peg$currPos); peg$currPos++; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c183); } + if (peg$silentFails === 0) { peg$fail(peg$c187); } } peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; @@ -6355,7 +6554,7 @@ module.exports = (function() { function peg$parsenum() { var s0, s1, s2, s3, s4, s5, s6; - var key = peg$currPos * 115 + 41, + var key = peg$currPos * 121 + 43, cached = peg$resultsCache[key]; if (cached) { @@ -6366,60 +6565,60 @@ module.exports = (function() { s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 45) { - s1 = peg$c184; + s1 = peg$c188; peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c185); } + if (peg$silentFails === 0) { peg$fail(peg$c189); } } if (s1 === peg$FAILED) { s1 = null; } if (s1 !== peg$FAILED) { s2 = []; - if (peg$c163.test(input.charAt(peg$currPos))) { + if (peg$c167.test(input.charAt(peg$currPos))) { s3 = input.charAt(peg$currPos); peg$currPos++; } else { s3 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c164); } + if (peg$silentFails === 0) { peg$fail(peg$c168); } } while (s3 !== peg$FAILED) { s2.push(s3); - if (peg$c163.test(input.charAt(peg$currPos))) { + if (peg$c167.test(input.charAt(peg$currPos))) { s3 = input.charAt(peg$currPos); peg$currPos++; } else { s3 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c164); } + if (peg$silentFails === 0) { peg$fail(peg$c168); } } } if (s2 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 46) { - s3 = peg$c186; + s3 = peg$c190; peg$currPos++; } else { s3 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c187); } + if (peg$silentFails === 0) { peg$fail(peg$c191); } } if (s3 !== peg$FAILED) { s4 = []; - if (peg$c163.test(input.charAt(peg$currPos))) { + if (peg$c167.test(input.charAt(peg$currPos))) { s5 = input.charAt(peg$currPos); peg$currPos++; } else { s5 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c164); } + if (peg$silentFails === 0) { peg$fail(peg$c168); } } if (s5 !== peg$FAILED) { while (s5 !== peg$FAILED) { s4.push(s5); - if (peg$c163.test(input.charAt(peg$currPos))) { + if (peg$c167.test(input.charAt(peg$currPos))) { s5 = input.charAt(peg$currPos); peg$currPos++; } else { s5 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c164); } + if (peg$silentFails === 0) { peg$fail(peg$c168); } } } } else { @@ -6462,33 +6661,33 @@ module.exports = (function() { if (s0 === peg$FAILED) { s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 45) { - s1 = peg$c184; + s1 = peg$c188; peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c185); } + if (peg$silentFails === 0) { peg$fail(peg$c189); } } if (s1 === peg$FAILED) { s1 = null; } if (s1 !== peg$FAILED) { s2 = []; - if (peg$c163.test(input.charAt(peg$currPos))) { + if (peg$c167.test(input.charAt(peg$currPos))) { s3 = input.charAt(peg$currPos); peg$currPos++; } else { s3 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c164); } + if (peg$silentFails === 0) { peg$fail(peg$c168); } } if (s3 !== peg$FAILED) { while (s3 !== peg$FAILED) { s2.push(s3); - if (peg$c163.test(input.charAt(peg$currPos))) { + if (peg$c167.test(input.charAt(peg$currPos))) { s3 = input.charAt(peg$currPos); peg$currPos++; } else { s3 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c164); } + if (peg$silentFails === 0) { peg$fail(peg$c168); } } } } else { @@ -6496,11 +6695,11 @@ module.exports = (function() { } if (s2 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 46) { - s3 = peg$c186; + s3 = peg$c190; peg$currPos++; } else { s3 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c187); } + if (peg$silentFails === 0) { peg$fail(peg$c191); } } if (s3 === peg$FAILED) { s3 = null; @@ -6545,7 +6744,7 @@ module.exports = (function() { function peg$parsespce() { var s0; - var key = peg$currPos * 115 + 42, + var key = peg$currPos * 121 + 44, cached = peg$resultsCache[key]; if (cached) { @@ -6554,108 +6753,108 @@ module.exports = (function() { return cached.result; } - if (input.substr(peg$currPos, 2) === peg$c188) { - s0 = peg$c188; + if (input.substr(peg$currPos, 2) === peg$c192) { + s0 = peg$c192; peg$currPos += 2; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c189); } + if (peg$silentFails === 0) { peg$fail(peg$c193); } } if (s0 === peg$FAILED) { - if (input.substr(peg$currPos, 2) === peg$c190) { - s0 = peg$c190; + if (input.substr(peg$currPos, 2) === peg$c194) { + s0 = peg$c194; peg$currPos += 2; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c191); } + if (peg$silentFails === 0) { peg$fail(peg$c195); } } if (s0 === peg$FAILED) { - if (input.substr(peg$currPos, 2) === peg$c192) { - s0 = peg$c192; + if (input.substr(peg$currPos, 2) === peg$c196) { + s0 = peg$c196; peg$currPos += 2; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c193); } + if (peg$silentFails === 0) { peg$fail(peg$c197); } } if (s0 === peg$FAILED) { - if (input.substr(peg$currPos, 2) === peg$c194) { - s0 = peg$c194; + if (input.substr(peg$currPos, 2) === peg$c198) { + s0 = peg$c198; peg$currPos += 2; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c195); } + if (peg$silentFails === 0) { peg$fail(peg$c199); } } if (s0 === peg$FAILED) { - if (input.substr(peg$currPos, 2) === peg$c196) { - s0 = peg$c196; + if (input.substr(peg$currPos, 2) === peg$c200) { + s0 = peg$c200; peg$currPos += 2; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c197); } + if (peg$silentFails === 0) { peg$fail(peg$c201); } } if (s0 === peg$FAILED) { - if (input.substr(peg$currPos, 2) === peg$c198) { - s0 = peg$c198; + if (input.substr(peg$currPos, 2) === peg$c202) { + s0 = peg$c202; peg$currPos += 2; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c199); } + if (peg$silentFails === 0) { peg$fail(peg$c203); } } if (s0 === peg$FAILED) { - if (input.substr(peg$currPos, 2) === peg$c200) { - s0 = peg$c200; + if (input.substr(peg$currPos, 2) === peg$c204) { + s0 = peg$c204; peg$currPos += 2; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c201); } + if (peg$silentFails === 0) { peg$fail(peg$c205); } } if (s0 === peg$FAILED) { - if (input.substr(peg$currPos, 2) === peg$c202) { - s0 = peg$c202; + if (input.substr(peg$currPos, 2) === peg$c206) { + s0 = peg$c206; peg$currPos += 2; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c203); } + if (peg$silentFails === 0) { peg$fail(peg$c207); } } if (s0 === peg$FAILED) { - if (input.substr(peg$currPos, 2) === peg$c204) { - s0 = peg$c204; + if (input.substr(peg$currPos, 2) === peg$c208) { + s0 = peg$c208; peg$currPos += 2; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c205); } + if (peg$silentFails === 0) { peg$fail(peg$c209); } } if (s0 === peg$FAILED) { - if (input.substr(peg$currPos, 2) === peg$c206) { - s0 = peg$c206; + if (input.substr(peg$currPos, 2) === peg$c210) { + s0 = peg$c210; peg$currPos += 2; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c207); } + if (peg$silentFails === 0) { peg$fail(peg$c211); } } if (s0 === peg$FAILED) { - if (input.substr(peg$currPos, 2) === peg$c208) { - s0 = peg$c208; + if (input.substr(peg$currPos, 2) === peg$c212) { + s0 = peg$c212; peg$currPos += 2; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c209); } + if (peg$silentFails === 0) { peg$fail(peg$c213); } } if (s0 === peg$FAILED) { - if (input.substr(peg$currPos, 2) === peg$c210) { - s0 = peg$c210; + if (input.substr(peg$currPos, 2) === peg$c214) { + s0 = peg$c214; peg$currPos += 2; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c211); } + if (peg$silentFails === 0) { peg$fail(peg$c215); } } if (s0 === peg$FAILED) { - if (input.substr(peg$currPos, 2) === peg$c212) { - s0 = peg$c212; + if (input.substr(peg$currPos, 2) === peg$c216) { + s0 = peg$c216; peg$currPos += 2; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c213); } + if (peg$silentFails === 0) { peg$fail(peg$c217); } } } } @@ -6678,7 +6877,7 @@ module.exports = (function() { function peg$parseatsymbol() { var s0; - var key = peg$currPos * 115 + 43, + var key = peg$currPos * 121 + 45, cached = peg$resultsCache[key]; if (cached) { @@ -6687,12 +6886,12 @@ module.exports = (function() { return cached.result; } - if (peg$c214.test(input.charAt(peg$currPos))) { + if (peg$c218.test(input.charAt(peg$currPos))) { s0 = input.charAt(peg$currPos); peg$currPos++; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c215); } + if (peg$silentFails === 0) { peg$fail(peg$c219); } } peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; @@ -6703,7 +6902,7 @@ module.exports = (function() { function peg$parseboxchars() { var s0, s1, s2; - var key = peg$currPos * 115 + 44, + var key = peg$currPos * 121 + 46, cached = peg$resultsCache[key]; if (cached) { @@ -6712,33 +6911,33 @@ module.exports = (function() { return cached.result; } - if (peg$c216.test(input.charAt(peg$currPos))) { + if (peg$c220.test(input.charAt(peg$currPos))) { s0 = input.charAt(peg$currPos); peg$currPos++; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c217); } + if (peg$silentFails === 0) { peg$fail(peg$c221); } } if (s0 === peg$FAILED) { s0 = peg$currPos; - if (peg$c218.test(input.charAt(peg$currPos))) { + if (peg$c222.test(input.charAt(peg$currPos))) { s1 = input.charAt(peg$currPos); peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c219); } + if (peg$silentFails === 0) { peg$fail(peg$c223); } } if (s1 !== peg$FAILED) { - if (peg$c220.test(input.charAt(peg$currPos))) { + if (peg$c224.test(input.charAt(peg$currPos))) { s2 = input.charAt(peg$currPos); peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c221); } + if (peg$silentFails === 0) { peg$fail(peg$c225); } } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c222(s1, s2); + s1 = peg$c226(s1, s2); s0 = s1; } else { peg$currPos = s0; @@ -6758,7 +6957,7 @@ module.exports = (function() { function peg$parseBOX() { var s0, s1, s2, s3, s4, s5, s6, s7; - var key = peg$currPos * 115 + 45, + var key = peg$currPos * 121 + 47, cached = peg$resultsCache[key]; if (cached) { @@ -6771,7 +6970,7 @@ module.exports = (function() { s1 = peg$parsegeneric_func(); if (s1 !== peg$FAILED) { peg$savedPos = peg$currPos; - s2 = peg$c223(s1); + s2 = peg$c227(s1); if (s2) { s2 = void 0; } else { @@ -6810,7 +7009,7 @@ module.exports = (function() { s7 = peg$parse_(); if (s7 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c224(s1, s5); + s1 = peg$c228(s1, s5); s0 = s1; } else { peg$currPos = s0; @@ -6849,7 +7048,7 @@ module.exports = (function() { function peg$parseLITERAL() { var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9; - var key = peg$currPos * 115 + 46, + var key = peg$currPos * 121 + 48, cached = peg$resultsCache[key]; if (cached) { @@ -6866,11 +7065,11 @@ module.exports = (function() { s1 = peg$parseliteral_uf_lt(); if (s1 === peg$FAILED) { if (input.charCodeAt(peg$currPos) === 45) { - s1 = peg$c184; + s1 = peg$c188; peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c185); } + if (peg$silentFails === 0) { peg$fail(peg$c189); } } if (s1 === peg$FAILED) { s1 = peg$parseliteral_uf_op(); @@ -6882,7 +7081,7 @@ module.exports = (function() { s2 = peg$parse_(); if (s2 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c225(s1); + s1 = peg$c229(s1); s0 = s1; } else { peg$currPos = s0; @@ -6897,7 +7096,7 @@ module.exports = (function() { s1 = peg$parsegeneric_func(); if (s1 !== peg$FAILED) { peg$savedPos = peg$currPos; - s2 = peg$c226(s1); + s2 = peg$c230(s1); if (s2) { s2 = void 0; } else { @@ -6907,11 +7106,11 @@ module.exports = (function() { s3 = peg$parse_(); if (s3 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 40) { - s4 = peg$c227; + s4 = peg$c231; peg$currPos++; } else { s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c228); } + if (peg$silentFails === 0) { peg$fail(peg$c232); } } if (s4 === peg$FAILED) { if (input.charCodeAt(peg$currPos) === 91) { @@ -6922,19 +7121,19 @@ module.exports = (function() { if (peg$silentFails === 0) { peg$fail(peg$c112); } } if (s4 === peg$FAILED) { - if (input.substr(peg$currPos, 2) === peg$c229) { - s4 = peg$c229; + if (input.substr(peg$currPos, 2) === peg$c233) { + s4 = peg$c233; peg$currPos += 2; } else { s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c230); } + if (peg$silentFails === 0) { peg$fail(peg$c234); } } if (s4 === peg$FAILED) { s4 = peg$currPos; s5 = peg$c50; if (s5 !== peg$FAILED) { peg$savedPos = s4; - s5 = peg$c231(s1); + s5 = peg$c235(s1); } s4 = s5; } @@ -6944,7 +7143,7 @@ module.exports = (function() { s5 = peg$parse_(); if (s5 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c232(s1, s4); + s1 = peg$c236(s1, s4); s0 = s1; } else { peg$currPos = s0; @@ -6971,7 +7170,7 @@ module.exports = (function() { s1 = peg$parsegeneric_func(); if (s1 !== peg$FAILED) { peg$savedPos = peg$currPos; - s2 = peg$c233(s1); + s2 = peg$c237(s1); if (s2) { s2 = void 0; } else { @@ -6981,11 +7180,11 @@ module.exports = (function() { s3 = peg$parse_(); if (s3 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 40) { - s4 = peg$c227; + s4 = peg$c231; peg$currPos++; } else { s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c228); } + if (peg$silentFails === 0) { peg$fail(peg$c232); } } if (s4 === peg$FAILED) { if (input.charCodeAt(peg$currPos) === 91) { @@ -6996,19 +7195,19 @@ module.exports = (function() { if (peg$silentFails === 0) { peg$fail(peg$c112); } } if (s4 === peg$FAILED) { - if (input.substr(peg$currPos, 2) === peg$c229) { - s4 = peg$c229; + if (input.substr(peg$currPos, 2) === peg$c233) { + s4 = peg$c233; peg$currPos += 2; } else { s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c230); } + if (peg$silentFails === 0) { peg$fail(peg$c234); } } if (s4 === peg$FAILED) { s4 = peg$currPos; s5 = peg$c50; if (s5 !== peg$FAILED) { peg$savedPos = s4; - s5 = peg$c234(s1); + s5 = peg$c238(s1); } s4 = s5; } @@ -7018,7 +7217,7 @@ module.exports = (function() { s5 = peg$parse_(); if (s5 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c235(s1, s4); + s1 = peg$c239(s1, s4); s0 = s1; } else { peg$currPos = s0; @@ -7045,7 +7244,7 @@ module.exports = (function() { s1 = peg$parsegeneric_func(); if (s1 !== peg$FAILED) { peg$savedPos = peg$currPos; - s2 = peg$c236(s1); + s2 = peg$c240(s1); if (s2) { s2 = void 0; } else { @@ -7055,7 +7254,7 @@ module.exports = (function() { s3 = peg$parse_(); if (s3 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c237(s1); + s1 = peg$c241(s1); s0 = s1; } else { peg$currPos = s0; @@ -7074,7 +7273,7 @@ module.exports = (function() { s1 = peg$parsegeneric_func(); if (s1 !== peg$FAILED) { peg$savedPos = peg$currPos; - s2 = peg$c238(s1); + s2 = peg$c242(s1); if (s2) { s2 = void 0; } else { @@ -7084,7 +7283,7 @@ module.exports = (function() { s3 = peg$parse_(); if (s3 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c239(s1); + s1 = peg$c243(s1); s0 = s1; } else { peg$currPos = s0; @@ -7103,7 +7302,7 @@ module.exports = (function() { s1 = peg$parsegeneric_func(); if (s1 !== peg$FAILED) { peg$savedPos = peg$currPos; - s2 = peg$c240(s1); + s2 = peg$c244(s1); if (s2) { s2 = void 0; } else { @@ -7123,7 +7322,7 @@ module.exports = (function() { s5 = peg$parsegeneric_func(); if (s5 !== peg$FAILED) { peg$savedPos = peg$currPos; - s6 = peg$c241(s1, s5); + s6 = peg$c245(s1, s5); if (s6) { s6 = void 0; } else { @@ -7143,7 +7342,7 @@ module.exports = (function() { s9 = peg$parse_(); if (s9 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c242(s1, s5); + s1 = peg$c246(s1, s5); s0 = s1; } else { peg$currPos = s0; @@ -7186,7 +7385,7 @@ module.exports = (function() { s1 = peg$parsegeneric_func(); if (s1 !== peg$FAILED) { peg$savedPos = peg$currPos; - s2 = peg$c243(s1); + s2 = peg$c247(s1); if (s2) { s2 = void 0; } else { @@ -7196,7 +7395,7 @@ module.exports = (function() { s3 = peg$parse_(); if (s3 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c244(s1); + s1 = peg$c248(s1); s0 = s1; } else { peg$currPos = s0; @@ -7215,7 +7414,7 @@ module.exports = (function() { s1 = peg$parsegeneric_func(); if (s1 !== peg$FAILED) { peg$savedPos = peg$currPos; - s2 = peg$c245(s1); + s2 = peg$c249(s1); if (s2) { s2 = void 0; } else { @@ -7235,7 +7434,7 @@ module.exports = (function() { s5 = peg$parsegeneric_func(); if (s5 !== peg$FAILED) { peg$savedPos = peg$currPos; - s6 = peg$c246(s1, s5); + s6 = peg$c250(s1, s5); if (s6) { s6 = void 0; } else { @@ -7255,7 +7454,7 @@ module.exports = (function() { s9 = peg$parse_(); if (s9 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c247(s1, s5); + s1 = peg$c251(s1, s5); s0 = s1; } else { peg$currPos = s0; @@ -7301,31 +7500,31 @@ module.exports = (function() { } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c248(s1); + s1 = peg$c252(s1); } s0 = s1; if (s0 === peg$FAILED) { s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 92) { - s1 = peg$c249; + s1 = peg$c253; peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c250); } + if (peg$silentFails === 0) { peg$fail(peg$c254); } } if (s1 !== peg$FAILED) { - if (peg$c251.test(input.charAt(peg$currPos))) { + if (peg$c255.test(input.charAt(peg$currPos))) { s2 = input.charAt(peg$currPos); peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c252); } + if (peg$silentFails === 0) { peg$fail(peg$c256); } } if (s2 !== peg$FAILED) { s3 = peg$parse_(); if (s3 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c253(s2); + s1 = peg$c257(s2); s0 = s1; } else { peg$currPos = s0; @@ -7341,18 +7540,18 @@ module.exports = (function() { } if (s0 === peg$FAILED) { s0 = peg$currPos; - if (peg$c254.test(input.charAt(peg$currPos))) { + if (peg$c258.test(input.charAt(peg$currPos))) { s1 = input.charAt(peg$currPos); peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c255); } + if (peg$silentFails === 0) { peg$fail(peg$c259); } } if (s1 !== peg$FAILED) { s2 = peg$parse_(); if (s2 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c225(s1); + s1 = peg$c229(s1); s0 = s1; } else { peg$currPos = s0; @@ -7364,18 +7563,18 @@ module.exports = (function() { } if (s0 === peg$FAILED) { s0 = peg$currPos; - if (peg$c256.test(input.charAt(peg$currPos))) { + if (peg$c260.test(input.charAt(peg$currPos))) { s1 = input.charAt(peg$currPos); peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c257); } + if (peg$silentFails === 0) { peg$fail(peg$c261); } } if (s1 !== peg$FAILED) { s2 = peg$parse_(); if (s2 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c258(s1); + s1 = peg$c262(s1); s0 = s1; } else { peg$currPos = s0; @@ -7405,7 +7604,7 @@ module.exports = (function() { function peg$parseLITERALPART() { var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9; - var key = peg$currPos * 115 + 47, + var key = peg$currPos * 121 + 49, cached = peg$resultsCache[key]; if (cached) { @@ -7418,7 +7617,7 @@ module.exports = (function() { s1 = peg$parsegeneric_func(); if (s1 !== peg$FAILED) { peg$savedPos = peg$currPos; - s2 = peg$c226(s1); + s2 = peg$c230(s1); if (s2) { s2 = void 0; } else { @@ -7428,11 +7627,11 @@ module.exports = (function() { s3 = peg$parse_(); if (s3 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 40) { - s4 = peg$c227; + s4 = peg$c231; peg$currPos++; } else { s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c228); } + if (peg$silentFails === 0) { peg$fail(peg$c232); } } if (s4 === peg$FAILED) { if (input.charCodeAt(peg$currPos) === 91) { @@ -7443,19 +7642,19 @@ module.exports = (function() { if (peg$silentFails === 0) { peg$fail(peg$c112); } } if (s4 === peg$FAILED) { - if (input.substr(peg$currPos, 2) === peg$c229) { - s4 = peg$c229; + if (input.substr(peg$currPos, 2) === peg$c233) { + s4 = peg$c233; peg$currPos += 2; } else { s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c230); } + if (peg$silentFails === 0) { peg$fail(peg$c234); } } if (s4 === peg$FAILED) { s4 = peg$currPos; s5 = peg$c50; if (s5 !== peg$FAILED) { peg$savedPos = s4; - s5 = peg$c231(s1); + s5 = peg$c235(s1); } s4 = s5; } @@ -7465,7 +7664,7 @@ module.exports = (function() { s5 = peg$parse_(); if (s5 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c232(s1, s4); + s1 = peg$c236(s1, s4); s0 = s1; } else { peg$currPos = s0; @@ -7492,7 +7691,7 @@ module.exports = (function() { s1 = peg$parsegeneric_func(); if (s1 !== peg$FAILED) { peg$savedPos = peg$currPos; - s2 = peg$c233(s1); + s2 = peg$c237(s1); if (s2) { s2 = void 0; } else { @@ -7502,11 +7701,11 @@ module.exports = (function() { s3 = peg$parse_(); if (s3 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 40) { - s4 = peg$c227; + s4 = peg$c231; peg$currPos++; } else { s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c228); } + if (peg$silentFails === 0) { peg$fail(peg$c232); } } if (s4 === peg$FAILED) { if (input.charCodeAt(peg$currPos) === 91) { @@ -7517,19 +7716,19 @@ module.exports = (function() { if (peg$silentFails === 0) { peg$fail(peg$c112); } } if (s4 === peg$FAILED) { - if (input.substr(peg$currPos, 2) === peg$c229) { - s4 = peg$c229; + if (input.substr(peg$currPos, 2) === peg$c233) { + s4 = peg$c233; peg$currPos += 2; } else { s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c230); } + if (peg$silentFails === 0) { peg$fail(peg$c234); } } if (s4 === peg$FAILED) { s4 = peg$currPos; s5 = peg$c50; if (s5 !== peg$FAILED) { peg$savedPos = s4; - s5 = peg$c234(s1); + s5 = peg$c238(s1); } s4 = s5; } @@ -7539,7 +7738,7 @@ module.exports = (function() { s5 = peg$parse_(); if (s5 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c235(s1, s4); + s1 = peg$c239(s1, s4); s0 = s1; } else { peg$currPos = s0; @@ -7566,7 +7765,7 @@ module.exports = (function() { s1 = peg$parsegeneric_func(); if (s1 !== peg$FAILED) { peg$savedPos = peg$currPos; - s2 = peg$c236(s1); + s2 = peg$c240(s1); if (s2) { s2 = void 0; } else { @@ -7576,7 +7775,7 @@ module.exports = (function() { s3 = peg$parse_(); if (s3 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c237(s1); + s1 = peg$c241(s1); s0 = s1; } else { peg$currPos = s0; @@ -7595,7 +7794,7 @@ module.exports = (function() { s1 = peg$parsegeneric_func(); if (s1 !== peg$FAILED) { peg$savedPos = peg$currPos; - s2 = peg$c243(s1); + s2 = peg$c247(s1); if (s2) { s2 = void 0; } else { @@ -7605,7 +7804,7 @@ module.exports = (function() { s3 = peg$parse_(); if (s3 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c244(s1); + s1 = peg$c248(s1); s0 = s1; } else { peg$currPos = s0; @@ -7624,7 +7823,7 @@ module.exports = (function() { s1 = peg$parsegeneric_func(); if (s1 !== peg$FAILED) { peg$savedPos = peg$currPos; - s2 = peg$c245(s1); + s2 = peg$c249(s1); if (s2) { s2 = void 0; } else { @@ -7644,7 +7843,7 @@ module.exports = (function() { s5 = peg$parsegeneric_func(); if (s5 !== peg$FAILED) { peg$savedPos = peg$currPos; - s6 = peg$c246(s1, s5); + s6 = peg$c250(s1, s5); if (s6) { s6 = void 0; } else { @@ -7664,7 +7863,7 @@ module.exports = (function() { s9 = peg$parse_(); if (s9 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c247(s1, s5); + s1 = peg$c251(s1, s5); s0 = s1; } else { peg$currPos = s0; @@ -7717,7 +7916,7 @@ module.exports = (function() { s3 = peg$parse_(); if (s3 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c259(s1); + s1 = peg$c263(s1); s0 = s1; } else { peg$currPos = s0; @@ -7739,31 +7938,31 @@ module.exports = (function() { } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c248(s1); + s1 = peg$c252(s1); } s0 = s1; if (s0 === peg$FAILED) { s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 92) { - s1 = peg$c249; + s1 = peg$c253; peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c250); } + if (peg$silentFails === 0) { peg$fail(peg$c254); } } if (s1 !== peg$FAILED) { - if (peg$c251.test(input.charAt(peg$currPos))) { + if (peg$c255.test(input.charAt(peg$currPos))) { s2 = input.charAt(peg$currPos); peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c252); } + if (peg$silentFails === 0) { peg$fail(peg$c256); } } if (s2 !== peg$FAILED) { s3 = peg$parse_(); if (s3 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c253(s2); + s1 = peg$c257(s2); s0 = s1; } else { peg$currPos = s0; @@ -7779,18 +7978,18 @@ module.exports = (function() { } if (s0 === peg$FAILED) { s0 = peg$currPos; - if (peg$c254.test(input.charAt(peg$currPos))) { + if (peg$c258.test(input.charAt(peg$currPos))) { s1 = input.charAt(peg$currPos); peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c255); } + if (peg$silentFails === 0) { peg$fail(peg$c259); } } if (s1 !== peg$FAILED) { s2 = peg$parse_(); if (s2 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c225(s1); + s1 = peg$c229(s1); s0 = s1; } else { peg$currPos = s0; @@ -7802,18 +8001,18 @@ module.exports = (function() { } if (s0 === peg$FAILED) { s0 = peg$currPos; - if (peg$c256.test(input.charAt(peg$currPos))) { + if (peg$c260.test(input.charAt(peg$currPos))) { s1 = input.charAt(peg$currPos); peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c257); } + if (peg$silentFails === 0) { peg$fail(peg$c261); } } if (s1 !== peg$FAILED) { s2 = peg$parse_(); if (s2 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c258(s1); + s1 = peg$c262(s1); s0 = s1; } else { peg$currPos = s0; @@ -7841,7 +8040,7 @@ module.exports = (function() { function peg$parseDELIMITER() { var s0, s1, s2, s3; - var key = peg$currPos * 115 + 48, + var key = peg$currPos * 121 + 50, cached = peg$resultsCache[key]; if (cached) { @@ -7868,7 +8067,7 @@ module.exports = (function() { s2 = peg$parse_(); if (s2 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c225(s1); + s1 = peg$c229(s1); s0 = s1; } else { peg$currPos = s0; @@ -7881,25 +8080,25 @@ module.exports = (function() { if (s0 === peg$FAILED) { s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 92) { - s1 = peg$c249; + s1 = peg$c253; peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c250); } + if (peg$silentFails === 0) { peg$fail(peg$c254); } } if (s1 !== peg$FAILED) { - if (peg$c260.test(input.charAt(peg$currPos))) { + if (peg$c264.test(input.charAt(peg$currPos))) { s2 = input.charAt(peg$currPos); peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c261); } + if (peg$silentFails === 0) { peg$fail(peg$c265); } } if (s2 !== peg$FAILED) { s3 = peg$parse_(); if (s3 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c253(s2); + s1 = peg$c257(s2); s0 = s1; } else { peg$currPos = s0; @@ -7918,7 +8117,7 @@ module.exports = (function() { s1 = peg$parsegeneric_func(); if (s1 !== peg$FAILED) { peg$savedPos = peg$currPos; - s2 = peg$c262(s1); + s2 = peg$c266(s1); if (s2) { s2 = void 0; } else { @@ -7928,7 +8127,7 @@ module.exports = (function() { s3 = peg$parse_(); if (s3 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c237(s1); + s1 = peg$c241(s1); s0 = s1; } else { peg$currPos = s0; @@ -7947,7 +8146,7 @@ module.exports = (function() { s1 = peg$parsegeneric_func(); if (s1 !== peg$FAILED) { peg$savedPos = peg$currPos; - s2 = peg$c263(s1); + s2 = peg$c267(s1); if (s2) { s2 = void 0; } else { @@ -7957,7 +8156,7 @@ module.exports = (function() { s3 = peg$parse_(); if (s3 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c264(s1); + s1 = peg$c268(s1); s0 = s1; } else { peg$currPos = s0; @@ -7978,7 +8177,7 @@ module.exports = (function() { s2 = peg$parse_(); if (s2 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c265(s1); + s1 = peg$c269(s1); s0 = s1; } else { peg$currPos = s0; @@ -8001,7 +8200,7 @@ module.exports = (function() { function peg$parseFUN_AR1nb() { var s0, s1, s2, s3, s4; - var key = peg$currPos * 115 + 49, + var key = peg$currPos * 121 + 51, cached = peg$resultsCache[key]; if (cached) { @@ -8014,7 +8213,7 @@ module.exports = (function() { s1 = peg$parsegeneric_func(); if (s1 !== peg$FAILED) { peg$savedPos = peg$currPos; - s2 = peg$c266(s1); + s2 = peg$c270(s1); if (s2) { s2 = void 0; } else { @@ -8029,7 +8228,7 @@ module.exports = (function() { } if (s3 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c267(s1); + s1 = peg$c271(s1); s0 = s1; } else { peg$currPos = s0; @@ -8052,7 +8251,7 @@ module.exports = (function() { function peg$parseFUN_AR1opt() { var s0, s1, s2, s3, s4, s5, s6; - var key = peg$currPos * 115 + 50, + var key = peg$currPos * 121 + 52, cached = peg$resultsCache[key]; if (cached) { @@ -8065,7 +8264,7 @@ module.exports = (function() { s1 = peg$parsegeneric_func(); if (s1 !== peg$FAILED) { peg$savedPos = peg$currPos; - s2 = peg$c268(s1); + s2 = peg$c272(s1); if (s2) { s2 = void 0; } else { @@ -8095,7 +8294,7 @@ module.exports = (function() { } if (s5 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c267(s1); + s1 = peg$c271(s1); s0 = s1; } else { peg$currPos = s0; @@ -8126,7 +8325,7 @@ module.exports = (function() { function peg$parseNEXT_CELL() { var s0, s1, s2; - var key = peg$currPos * 115 + 51, + var key = peg$currPos * 121 + 53, cached = peg$resultsCache[key]; if (cached) { @@ -8137,11 +8336,11 @@ module.exports = (function() { s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 38) { - s1 = peg$c269; + s1 = peg$c273; peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c270); } + if (peg$silentFails === 0) { peg$fail(peg$c274); } } if (s1 !== peg$FAILED) { s2 = peg$parse_(); @@ -8165,7 +8364,7 @@ module.exports = (function() { function peg$parseNEXT_ROW() { var s0, s1, s2; - var key = peg$currPos * 115 + 52, + var key = peg$currPos * 121 + 54, cached = peg$resultsCache[key]; if (cached) { @@ -8175,12 +8374,12 @@ module.exports = (function() { } s0 = peg$currPos; - if (input.substr(peg$currPos, 2) === peg$c271) { - s1 = peg$c271; + if (input.substr(peg$currPos, 2) === peg$c275) { + s1 = peg$c275; peg$currPos += 2; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c272); } + if (peg$silentFails === 0) { peg$fail(peg$c276); } } if (s1 !== peg$FAILED) { s2 = peg$parse_(); @@ -8204,7 +8403,7 @@ module.exports = (function() { function peg$parseBEGIN() { var s0, s1, s2; - var key = peg$currPos * 115 + 53, + var key = peg$currPos * 121 + 55, cached = peg$resultsCache[key]; if (cached) { @@ -8214,12 +8413,12 @@ module.exports = (function() { } s0 = peg$currPos; - if (input.substr(peg$currPos, 6) === peg$c273) { - s1 = peg$c273; + if (input.substr(peg$currPos, 6) === peg$c277) { + s1 = peg$c277; peg$currPos += 6; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c274); } + if (peg$silentFails === 0) { peg$fail(peg$c278); } } if (s1 !== peg$FAILED) { s2 = peg$parse_(); @@ -8243,7 +8442,7 @@ module.exports = (function() { function peg$parseEND() { var s0, s1, s2; - var key = peg$currPos * 115 + 54, + var key = peg$currPos * 121 + 56, cached = peg$resultsCache[key]; if (cached) { @@ -8253,12 +8452,12 @@ module.exports = (function() { } s0 = peg$currPos; - if (input.substr(peg$currPos, 4) === peg$c275) { - s1 = peg$c275; + if (input.substr(peg$currPos, 4) === peg$c279) { + s1 = peg$c279; peg$currPos += 4; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c276); } + if (peg$silentFails === 0) { peg$fail(peg$c280); } } if (s1 !== peg$FAILED) { s2 = peg$parse_(); @@ -8282,7 +8481,7 @@ module.exports = (function() { function peg$parseBEGIN_MATRIX() { var s0, s1, s2, s3; - var key = peg$currPos * 115 + 55, + var key = peg$currPos * 121 + 57, cached = peg$resultsCache[key]; if (cached) { @@ -8294,12 +8493,12 @@ module.exports = (function() { s0 = peg$currPos; s1 = peg$parseBEGIN(); if (s1 !== peg$FAILED) { - if (input.substr(peg$currPos, 8) === peg$c277) { - s2 = peg$c277; + if (input.substr(peg$currPos, 8) === peg$c281) { + s2 = peg$c281; peg$currPos += 8; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c278); } + if (peg$silentFails === 0) { peg$fail(peg$c282); } } if (s2 !== peg$FAILED) { s3 = peg$parse_(); @@ -8327,7 +8526,7 @@ module.exports = (function() { function peg$parseEND_MATRIX() { var s0, s1, s2, s3; - var key = peg$currPos * 115 + 56, + var key = peg$currPos * 121 + 58, cached = peg$resultsCache[key]; if (cached) { @@ -8339,12 +8538,12 @@ module.exports = (function() { s0 = peg$currPos; s1 = peg$parseEND(); if (s1 !== peg$FAILED) { - if (input.substr(peg$currPos, 8) === peg$c277) { - s2 = peg$c277; + if (input.substr(peg$currPos, 8) === peg$c281) { + s2 = peg$c281; peg$currPos += 8; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c278); } + if (peg$silentFails === 0) { peg$fail(peg$c282); } } if (s2 !== peg$FAILED) { s3 = peg$parse_(); @@ -8372,7 +8571,7 @@ module.exports = (function() { function peg$parseBEGIN_PMATRIX() { var s0, s1, s2, s3; - var key = peg$currPos * 115 + 57, + var key = peg$currPos * 121 + 59, cached = peg$resultsCache[key]; if (cached) { @@ -8384,12 +8583,12 @@ module.exports = (function() { s0 = peg$currPos; s1 = peg$parseBEGIN(); if (s1 !== peg$FAILED) { - if (input.substr(peg$currPos, 9) === peg$c279) { - s2 = peg$c279; + if (input.substr(peg$currPos, 9) === peg$c283) { + s2 = peg$c283; peg$currPos += 9; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c280); } + if (peg$silentFails === 0) { peg$fail(peg$c284); } } if (s2 !== peg$FAILED) { s3 = peg$parse_(); @@ -8417,7 +8616,7 @@ module.exports = (function() { function peg$parseEND_PMATRIX() { var s0, s1, s2, s3; - var key = peg$currPos * 115 + 58, + var key = peg$currPos * 121 + 60, cached = peg$resultsCache[key]; if (cached) { @@ -8429,12 +8628,12 @@ module.exports = (function() { s0 = peg$currPos; s1 = peg$parseEND(); if (s1 !== peg$FAILED) { - if (input.substr(peg$currPos, 9) === peg$c279) { - s2 = peg$c279; + if (input.substr(peg$currPos, 9) === peg$c283) { + s2 = peg$c283; peg$currPos += 9; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c280); } + if (peg$silentFails === 0) { peg$fail(peg$c284); } } if (s2 !== peg$FAILED) { s3 = peg$parse_(); @@ -8462,7 +8661,7 @@ module.exports = (function() { function peg$parseBEGIN_BMATRIX() { var s0, s1, s2, s3; - var key = peg$currPos * 115 + 59, + var key = peg$currPos * 121 + 61, cached = peg$resultsCache[key]; if (cached) { @@ -8474,12 +8673,12 @@ module.exports = (function() { s0 = peg$currPos; s1 = peg$parseBEGIN(); if (s1 !== peg$FAILED) { - if (input.substr(peg$currPos, 9) === peg$c281) { - s2 = peg$c281; + if (input.substr(peg$currPos, 9) === peg$c285) { + s2 = peg$c285; peg$currPos += 9; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c282); } + if (peg$silentFails === 0) { peg$fail(peg$c286); } } if (s2 !== peg$FAILED) { s3 = peg$parse_(); @@ -8507,7 +8706,7 @@ module.exports = (function() { function peg$parseEND_BMATRIX() { var s0, s1, s2, s3; - var key = peg$currPos * 115 + 60, + var key = peg$currPos * 121 + 62, cached = peg$resultsCache[key]; if (cached) { @@ -8519,12 +8718,12 @@ module.exports = (function() { s0 = peg$currPos; s1 = peg$parseEND(); if (s1 !== peg$FAILED) { - if (input.substr(peg$currPos, 9) === peg$c281) { - s2 = peg$c281; + if (input.substr(peg$currPos, 9) === peg$c285) { + s2 = peg$c285; peg$currPos += 9; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c282); } + if (peg$silentFails === 0) { peg$fail(peg$c286); } } if (s2 !== peg$FAILED) { s3 = peg$parse_(); @@ -8552,7 +8751,7 @@ module.exports = (function() { function peg$parseBEGIN_BBMATRIX() { var s0, s1, s2, s3; - var key = peg$currPos * 115 + 61, + var key = peg$currPos * 121 + 63, cached = peg$resultsCache[key]; if (cached) { @@ -8564,12 +8763,12 @@ module.exports = (function() { s0 = peg$currPos; s1 = peg$parseBEGIN(); if (s1 !== peg$FAILED) { - if (input.substr(peg$currPos, 9) === peg$c283) { - s2 = peg$c283; + if (input.substr(peg$currPos, 9) === peg$c287) { + s2 = peg$c287; peg$currPos += 9; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c284); } + if (peg$silentFails === 0) { peg$fail(peg$c288); } } if (s2 !== peg$FAILED) { s3 = peg$parse_(); @@ -8597,7 +8796,7 @@ module.exports = (function() { function peg$parseEND_BBMATRIX() { var s0, s1, s2, s3; - var key = peg$currPos * 115 + 62, + var key = peg$currPos * 121 + 64, cached = peg$resultsCache[key]; if (cached) { @@ -8609,12 +8808,12 @@ module.exports = (function() { s0 = peg$currPos; s1 = peg$parseEND(); if (s1 !== peg$FAILED) { - if (input.substr(peg$currPos, 9) === peg$c283) { - s2 = peg$c283; + if (input.substr(peg$currPos, 9) === peg$c287) { + s2 = peg$c287; peg$currPos += 9; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c284); } + if (peg$silentFails === 0) { peg$fail(peg$c288); } } if (s2 !== peg$FAILED) { s3 = peg$parse_(); @@ -8642,7 +8841,7 @@ module.exports = (function() { function peg$parseBEGIN_VMATRIX() { var s0, s1, s2, s3; - var key = peg$currPos * 115 + 63, + var key = peg$currPos * 121 + 65, cached = peg$resultsCache[key]; if (cached) { @@ -8654,12 +8853,12 @@ module.exports = (function() { s0 = peg$currPos; s1 = peg$parseBEGIN(); if (s1 !== peg$FAILED) { - if (input.substr(peg$currPos, 9) === peg$c285) { - s2 = peg$c285; + if (input.substr(peg$currPos, 9) === peg$c289) { + s2 = peg$c289; peg$currPos += 9; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c286); } + if (peg$silentFails === 0) { peg$fail(peg$c290); } } if (s2 !== peg$FAILED) { s3 = peg$parse_(); @@ -8687,7 +8886,7 @@ module.exports = (function() { function peg$parseEND_VMATRIX() { var s0, s1, s2, s3; - var key = peg$currPos * 115 + 64, + var key = peg$currPos * 121 + 66, cached = peg$resultsCache[key]; if (cached) { @@ -8699,12 +8898,12 @@ module.exports = (function() { s0 = peg$currPos; s1 = peg$parseEND(); if (s1 !== peg$FAILED) { - if (input.substr(peg$currPos, 9) === peg$c285) { - s2 = peg$c285; + if (input.substr(peg$currPos, 9) === peg$c289) { + s2 = peg$c289; peg$currPos += 9; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c286); } + if (peg$silentFails === 0) { peg$fail(peg$c290); } } if (s2 !== peg$FAILED) { s3 = peg$parse_(); @@ -8732,7 +8931,7 @@ module.exports = (function() { function peg$parseBEGIN_VVMATRIX() { var s0, s1, s2, s3; - var key = peg$currPos * 115 + 65, + var key = peg$currPos * 121 + 67, cached = peg$resultsCache[key]; if (cached) { @@ -8744,12 +8943,12 @@ module.exports = (function() { s0 = peg$currPos; s1 = peg$parseBEGIN(); if (s1 !== peg$FAILED) { - if (input.substr(peg$currPos, 9) === peg$c287) { - s2 = peg$c287; + if (input.substr(peg$currPos, 9) === peg$c291) { + s2 = peg$c291; peg$currPos += 9; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c288); } + if (peg$silentFails === 0) { peg$fail(peg$c292); } } if (s2 !== peg$FAILED) { s3 = peg$parse_(); @@ -8777,7 +8976,7 @@ module.exports = (function() { function peg$parseEND_VVMATRIX() { var s0, s1, s2, s3; - var key = peg$currPos * 115 + 66, + var key = peg$currPos * 121 + 68, cached = peg$resultsCache[key]; if (cached) { @@ -8789,12 +8988,12 @@ module.exports = (function() { s0 = peg$currPos; s1 = peg$parseEND(); if (s1 !== peg$FAILED) { - if (input.substr(peg$currPos, 9) === peg$c287) { - s2 = peg$c287; + if (input.substr(peg$currPos, 9) === peg$c291) { + s2 = peg$c291; peg$currPos += 9; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c288); } + if (peg$silentFails === 0) { peg$fail(peg$c292); } } if (s2 !== peg$FAILED) { s3 = peg$parse_(); @@ -8822,7 +9021,7 @@ module.exports = (function() { function peg$parseBEGIN_ARRAY() { var s0, s1, s2, s3; - var key = peg$currPos * 115 + 67, + var key = peg$currPos * 121 + 69, cached = peg$resultsCache[key]; if (cached) { @@ -8834,12 +9033,12 @@ module.exports = (function() { s0 = peg$currPos; s1 = peg$parseBEGIN(); if (s1 !== peg$FAILED) { - if (input.substr(peg$currPos, 7) === peg$c289) { - s2 = peg$c289; + if (input.substr(peg$currPos, 7) === peg$c293) { + s2 = peg$c293; peg$currPos += 7; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c290); } + if (peg$silentFails === 0) { peg$fail(peg$c294); } } if (s2 !== peg$FAILED) { s3 = peg$parse_(); @@ -8867,7 +9066,7 @@ module.exports = (function() { function peg$parseEND_ARRAY() { var s0, s1, s2, s3; - var key = peg$currPos * 115 + 68, + var key = peg$currPos * 121 + 70, cached = peg$resultsCache[key]; if (cached) { @@ -8879,12 +9078,12 @@ module.exports = (function() { s0 = peg$currPos; s1 = peg$parseEND(); if (s1 !== peg$FAILED) { - if (input.substr(peg$currPos, 7) === peg$c289) { - s2 = peg$c289; + if (input.substr(peg$currPos, 7) === peg$c293) { + s2 = peg$c293; peg$currPos += 7; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c290); } + if (peg$silentFails === 0) { peg$fail(peg$c294); } } if (s2 !== peg$FAILED) { s3 = peg$parse_(); @@ -8912,7 +9111,7 @@ module.exports = (function() { function peg$parseBEGIN_ALIGN() { var s0, s1, s2, s3; - var key = peg$currPos * 115 + 69, + var key = peg$currPos * 121 + 71, cached = peg$resultsCache[key]; if (cached) { @@ -8924,12 +9123,12 @@ module.exports = (function() { s0 = peg$currPos; s1 = peg$parseBEGIN(); if (s1 !== peg$FAILED) { - if (input.substr(peg$currPos, 7) === peg$c291) { - s2 = peg$c291; + if (input.substr(peg$currPos, 7) === peg$c295) { + s2 = peg$c295; peg$currPos += 7; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c292); } + if (peg$silentFails === 0) { peg$fail(peg$c296); } } if (s2 !== peg$FAILED) { s3 = peg$parse_(); @@ -8957,7 +9156,7 @@ module.exports = (function() { function peg$parseEND_ALIGN() { var s0, s1, s2, s3; - var key = peg$currPos * 115 + 70, + var key = peg$currPos * 121 + 72, cached = peg$resultsCache[key]; if (cached) { @@ -8969,12 +9168,12 @@ module.exports = (function() { s0 = peg$currPos; s1 = peg$parseEND(); if (s1 !== peg$FAILED) { - if (input.substr(peg$currPos, 7) === peg$c291) { - s2 = peg$c291; + if (input.substr(peg$currPos, 7) === peg$c295) { + s2 = peg$c295; peg$currPos += 7; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c292); } + if (peg$silentFails === 0) { peg$fail(peg$c296); } } if (s2 !== peg$FAILED) { s3 = peg$parse_(); @@ -9002,7 +9201,7 @@ module.exports = (function() { function peg$parseBEGIN_ALIGNED() { var s0, s1, s2, s3; - var key = peg$currPos * 115 + 71, + var key = peg$currPos * 121 + 73, cached = peg$resultsCache[key]; if (cached) { @@ -9014,12 +9213,12 @@ module.exports = (function() { s0 = peg$currPos; s1 = peg$parseBEGIN(); if (s1 !== peg$FAILED) { - if (input.substr(peg$currPos, 9) === peg$c293) { - s2 = peg$c293; + if (input.substr(peg$currPos, 9) === peg$c297) { + s2 = peg$c297; peg$currPos += 9; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c294); } + if (peg$silentFails === 0) { peg$fail(peg$c298); } } if (s2 !== peg$FAILED) { s3 = peg$parse_(); @@ -9047,7 +9246,7 @@ module.exports = (function() { function peg$parseEND_ALIGNED() { var s0, s1, s2, s3; - var key = peg$currPos * 115 + 72, + var key = peg$currPos * 121 + 74, cached = peg$resultsCache[key]; if (cached) { @@ -9059,12 +9258,12 @@ module.exports = (function() { s0 = peg$currPos; s1 = peg$parseEND(); if (s1 !== peg$FAILED) { - if (input.substr(peg$currPos, 9) === peg$c293) { - s2 = peg$c293; + if (input.substr(peg$currPos, 9) === peg$c297) { + s2 = peg$c297; peg$currPos += 9; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c294); } + if (peg$silentFails === 0) { peg$fail(peg$c298); } } if (s2 !== peg$FAILED) { s3 = peg$parse_(); @@ -9092,7 +9291,7 @@ module.exports = (function() { function peg$parseBEGIN_ALIGNAT() { var s0, s1, s2, s3; - var key = peg$currPos * 115 + 73, + var key = peg$currPos * 121 + 75, cached = peg$resultsCache[key]; if (cached) { @@ -9104,12 +9303,12 @@ module.exports = (function() { s0 = peg$currPos; s1 = peg$parseBEGIN(); if (s1 !== peg$FAILED) { - if (input.substr(peg$currPos, 9) === peg$c295) { - s2 = peg$c295; + if (input.substr(peg$currPos, 9) === peg$c299) { + s2 = peg$c299; peg$currPos += 9; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c296); } + if (peg$silentFails === 0) { peg$fail(peg$c300); } } if (s2 !== peg$FAILED) { s3 = peg$parse_(); @@ -9137,7 +9336,7 @@ module.exports = (function() { function peg$parseEND_ALIGNAT() { var s0, s1, s2, s3; - var key = peg$currPos * 115 + 74, + var key = peg$currPos * 121 + 76, cached = peg$resultsCache[key]; if (cached) { @@ -9149,12 +9348,12 @@ module.exports = (function() { s0 = peg$currPos; s1 = peg$parseEND(); if (s1 !== peg$FAILED) { - if (input.substr(peg$currPos, 9) === peg$c295) { - s2 = peg$c295; + if (input.substr(peg$currPos, 9) === peg$c299) { + s2 = peg$c299; peg$currPos += 9; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c296); } + if (peg$silentFails === 0) { peg$fail(peg$c300); } } if (s2 !== peg$FAILED) { s3 = peg$parse_(); @@ -9182,7 +9381,7 @@ module.exports = (function() { function peg$parseBEGIN_ALIGNEDAT() { var s0, s1, s2, s3; - var key = peg$currPos * 115 + 75, + var key = peg$currPos * 121 + 77, cached = peg$resultsCache[key]; if (cached) { @@ -9194,12 +9393,12 @@ module.exports = (function() { s0 = peg$currPos; s1 = peg$parseBEGIN(); if (s1 !== peg$FAILED) { - if (input.substr(peg$currPos, 11) === peg$c297) { - s2 = peg$c297; + if (input.substr(peg$currPos, 11) === peg$c301) { + s2 = peg$c301; peg$currPos += 11; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c298); } + if (peg$silentFails === 0) { peg$fail(peg$c302); } } if (s2 !== peg$FAILED) { s3 = peg$parse_(); @@ -9227,7 +9426,7 @@ module.exports = (function() { function peg$parseEND_ALIGNEDAT() { var s0, s1, s2, s3; - var key = peg$currPos * 115 + 76, + var key = peg$currPos * 121 + 78, cached = peg$resultsCache[key]; if (cached) { @@ -9239,12 +9438,12 @@ module.exports = (function() { s0 = peg$currPos; s1 = peg$parseEND(); if (s1 !== peg$FAILED) { - if (input.substr(peg$currPos, 11) === peg$c297) { - s2 = peg$c297; + if (input.substr(peg$currPos, 11) === peg$c301) { + s2 = peg$c301; peg$currPos += 11; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c298); } + if (peg$silentFails === 0) { peg$fail(peg$c302); } } if (s2 !== peg$FAILED) { s3 = peg$parse_(); @@ -9272,7 +9471,7 @@ module.exports = (function() { function peg$parseBEGIN_SMALLMATRIX() { var s0, s1, s2, s3; - var key = peg$currPos * 115 + 77, + var key = peg$currPos * 121 + 79, cached = peg$resultsCache[key]; if (cached) { @@ -9284,12 +9483,12 @@ module.exports = (function() { s0 = peg$currPos; s1 = peg$parseBEGIN(); if (s1 !== peg$FAILED) { - if (input.substr(peg$currPos, 13) === peg$c299) { - s2 = peg$c299; + if (input.substr(peg$currPos, 13) === peg$c303) { + s2 = peg$c303; peg$currPos += 13; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c300); } + if (peg$silentFails === 0) { peg$fail(peg$c304); } } if (s2 !== peg$FAILED) { s3 = peg$parse_(); @@ -9317,7 +9516,7 @@ module.exports = (function() { function peg$parseEND_SMALLMATRIX() { var s0, s1, s2, s3; - var key = peg$currPos * 115 + 78, + var key = peg$currPos * 121 + 80, cached = peg$resultsCache[key]; if (cached) { @@ -9329,12 +9528,12 @@ module.exports = (function() { s0 = peg$currPos; s1 = peg$parseEND(); if (s1 !== peg$FAILED) { - if (input.substr(peg$currPos, 13) === peg$c299) { - s2 = peg$c299; + if (input.substr(peg$currPos, 13) === peg$c303) { + s2 = peg$c303; peg$currPos += 13; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c300); } + if (peg$silentFails === 0) { peg$fail(peg$c304); } } if (s2 !== peg$FAILED) { s3 = peg$parse_(); @@ -9362,7 +9561,7 @@ module.exports = (function() { function peg$parseBEGIN_CASES() { var s0, s1, s2, s3; - var key = peg$currPos * 115 + 79, + var key = peg$currPos * 121 + 81, cached = peg$resultsCache[key]; if (cached) { @@ -9374,12 +9573,12 @@ module.exports = (function() { s0 = peg$currPos; s1 = peg$parseBEGIN(); if (s1 !== peg$FAILED) { - if (input.substr(peg$currPos, 7) === peg$c301) { - s2 = peg$c301; + if (input.substr(peg$currPos, 7) === peg$c305) { + s2 = peg$c305; peg$currPos += 7; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c302); } + if (peg$silentFails === 0) { peg$fail(peg$c306); } } if (s2 !== peg$FAILED) { s3 = peg$parse_(); @@ -9407,7 +9606,7 @@ module.exports = (function() { function peg$parseEND_CASES() { var s0, s1, s2, s3; - var key = peg$currPos * 115 + 80, + var key = peg$currPos * 121 + 82, cached = peg$resultsCache[key]; if (cached) { @@ -9419,12 +9618,192 @@ module.exports = (function() { s0 = peg$currPos; s1 = peg$parseEND(); if (s1 !== peg$FAILED) { - if (input.substr(peg$currPos, 7) === peg$c301) { - s2 = peg$c301; + if (input.substr(peg$currPos, 7) === peg$c305) { + s2 = peg$c305; peg$currPos += 7; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c302); } + if (peg$silentFails === 0) { peg$fail(peg$c306); } + } + if (s2 !== peg$FAILED) { + s3 = peg$parse_(); + if (s3 !== peg$FAILED) { + s1 = [s1, s2, s3]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + function peg$parseBEGIN_MULTLINE() { + var s0, s1, s2, s3; + + var key = peg$currPos * 121 + 83, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + s0 = peg$currPos; + s1 = peg$parseBEGIN(); + if (s1 !== peg$FAILED) { + if (input.substr(peg$currPos, 10) === peg$c307) { + s2 = peg$c307; + peg$currPos += 10; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c308); } + } + if (s2 !== peg$FAILED) { + s3 = peg$parse_(); + if (s3 !== peg$FAILED) { + s1 = [s1, s2, s3]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + function peg$parseEND_MULTLINE() { + var s0, s1, s2, s3; + + var key = peg$currPos * 121 + 84, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + s0 = peg$currPos; + s1 = peg$parseEND(); + if (s1 !== peg$FAILED) { + if (input.substr(peg$currPos, 10) === peg$c307) { + s2 = peg$c307; + peg$currPos += 10; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c308); } + } + if (s2 !== peg$FAILED) { + s3 = peg$parse_(); + if (s3 !== peg$FAILED) { + s1 = [s1, s2, s3]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + function peg$parseBEGIN_MULTLINE_STAR() { + var s0, s1, s2, s3; + + var key = peg$currPos * 121 + 85, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + s0 = peg$currPos; + s1 = peg$parseBEGIN(); + if (s1 !== peg$FAILED) { + if (input.substr(peg$currPos, 11) === peg$c309) { + s2 = peg$c309; + peg$currPos += 11; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c310); } + } + if (s2 !== peg$FAILED) { + s3 = peg$parse_(); + if (s3 !== peg$FAILED) { + s1 = [s1, s2, s3]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + function peg$parseEND_MULTLINE_STAR() { + var s0, s1, s2, s3; + + var key = peg$currPos * 121 + 86, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + s0 = peg$currPos; + s1 = peg$parseEND(); + if (s1 !== peg$FAILED) { + if (input.substr(peg$currPos, 11) === peg$c309) { + s2 = peg$c309; + peg$currPos += 11; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c310); } } if (s2 !== peg$FAILED) { s3 = peg$parse_(); @@ -9452,7 +9831,7 @@ module.exports = (function() { function peg$parseSQ_CLOSE() { var s0, s1, s2; - var key = peg$currPos * 115 + 81, + var key = peg$currPos * 121 + 87, cached = peg$resultsCache[key]; if (cached) { @@ -9491,7 +9870,7 @@ module.exports = (function() { function peg$parseCURLY_OPEN() { var s0, s1, s2; - var key = peg$currPos * 115 + 82, + var key = peg$currPos * 121 + 88, cached = peg$resultsCache[key]; if (cached) { @@ -9530,7 +9909,7 @@ module.exports = (function() { function peg$parseCURLY_CLOSE() { var s0, s1, s2; - var key = peg$currPos * 115 + 83, + var key = peg$currPos * 121 + 89, cached = peg$resultsCache[key]; if (cached) { @@ -9569,7 +9948,7 @@ module.exports = (function() { function peg$parsePAREN_OPEN() { var s0, s1, s2; - var key = peg$currPos * 115 + 84, + var key = peg$currPos * 121 + 90, cached = peg$resultsCache[key]; if (cached) { @@ -9580,11 +9959,11 @@ module.exports = (function() { s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 40) { - s1 = peg$c227; + s1 = peg$c231; peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c228); } + if (peg$silentFails === 0) { peg$fail(peg$c232); } } if (s1 !== peg$FAILED) { s2 = peg$parse_(); @@ -9601,12 +9980,12 @@ module.exports = (function() { } if (s0 === peg$FAILED) { s0 = peg$currPos; - if (input.substr(peg$currPos, 5) === peg$c303) { - s1 = peg$c303; + if (input.substr(peg$currPos, 5) === peg$c311) { + s1 = peg$c311; peg$currPos += 5; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c304); } + if (peg$silentFails === 0) { peg$fail(peg$c312); } } if (s1 !== peg$FAILED) { s2 = peg$parse_(); @@ -9623,12 +10002,12 @@ module.exports = (function() { } if (s0 === peg$FAILED) { s0 = peg$currPos; - if (input.substr(peg$currPos, 5) === peg$c305) { - s1 = peg$c305; + if (input.substr(peg$currPos, 5) === peg$c313) { + s1 = peg$c313; peg$currPos += 5; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c306); } + if (peg$silentFails === 0) { peg$fail(peg$c314); } } if (s1 !== peg$FAILED) { s2 = peg$parse_(); @@ -9645,12 +10024,12 @@ module.exports = (function() { } if (s0 === peg$FAILED) { s0 = peg$currPos; - if (input.substr(peg$currPos, 6) === peg$c307) { - s1 = peg$c307; + if (input.substr(peg$currPos, 6) === peg$c315) { + s1 = peg$c315; peg$currPos += 6; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c308); } + if (peg$silentFails === 0) { peg$fail(peg$c316); } } if (s1 !== peg$FAILED) { s2 = peg$parse_(); @@ -9667,12 +10046,12 @@ module.exports = (function() { } if (s0 === peg$FAILED) { s0 = peg$currPos; - if (input.substr(peg$currPos, 6) === peg$c309) { - s1 = peg$c309; + if (input.substr(peg$currPos, 6) === peg$c317) { + s1 = peg$c317; peg$currPos += 6; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c310); } + if (peg$silentFails === 0) { peg$fail(peg$c318); } } if (s1 !== peg$FAILED) { s2 = peg$parse_(); @@ -9689,12 +10068,12 @@ module.exports = (function() { } if (s0 === peg$FAILED) { s0 = peg$currPos; - if (input.substr(peg$currPos, 6) === peg$c311) { - s1 = peg$c311; + if (input.substr(peg$currPos, 6) === peg$c319) { + s1 = peg$c319; peg$currPos += 6; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c312); } + if (peg$silentFails === 0) { peg$fail(peg$c320); } } if (s1 !== peg$FAILED) { s2 = peg$parse_(); @@ -9711,12 +10090,12 @@ module.exports = (function() { } if (s0 === peg$FAILED) { s0 = peg$currPos; - if (input.substr(peg$currPos, 6) === peg$c313) { - s1 = peg$c313; + if (input.substr(peg$currPos, 6) === peg$c321) { + s1 = peg$c321; peg$currPos += 6; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c314); } + if (peg$silentFails === 0) { peg$fail(peg$c322); } } if (s1 !== peg$FAILED) { s2 = peg$parse_(); @@ -9733,12 +10112,12 @@ module.exports = (function() { } if (s0 === peg$FAILED) { s0 = peg$currPos; - if (input.substr(peg$currPos, 7) === peg$c315) { - s1 = peg$c315; + if (input.substr(peg$currPos, 7) === peg$c323) { + s1 = peg$c323; peg$currPos += 7; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c316); } + if (peg$silentFails === 0) { peg$fail(peg$c324); } } if (s1 !== peg$FAILED) { s2 = peg$parse_(); @@ -9755,12 +10134,12 @@ module.exports = (function() { } if (s0 === peg$FAILED) { s0 = peg$currPos; - if (input.substr(peg$currPos, 7) === peg$c317) { - s1 = peg$c317; + if (input.substr(peg$currPos, 7) === peg$c325) { + s1 = peg$c325; peg$currPos += 7; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c318); } + if (peg$silentFails === 0) { peg$fail(peg$c326); } } if (s1 !== peg$FAILED) { s2 = peg$parse_(); @@ -9777,12 +10156,12 @@ module.exports = (function() { } if (s0 === peg$FAILED) { s0 = peg$currPos; - if (input.substr(peg$currPos, 6) === peg$c319) { - s1 = peg$c319; + if (input.substr(peg$currPos, 6) === peg$c327) { + s1 = peg$c327; peg$currPos += 6; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c320); } + if (peg$silentFails === 0) { peg$fail(peg$c328); } } if (s1 !== peg$FAILED) { s2 = peg$parse_(); @@ -9815,7 +10194,7 @@ module.exports = (function() { function peg$parsePAREN_CLOSE() { var s0, s1, s2; - var key = peg$currPos * 115 + 85, + var key = peg$currPos * 121 + 91, cached = peg$resultsCache[key]; if (cached) { @@ -9826,11 +10205,11 @@ module.exports = (function() { s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 41) { - s1 = peg$c321; + s1 = peg$c329; peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c322); } + if (peg$silentFails === 0) { peg$fail(peg$c330); } } if (s1 !== peg$FAILED) { s2 = peg$parse_(); @@ -9847,12 +10226,12 @@ module.exports = (function() { } if (s0 === peg$FAILED) { s0 = peg$currPos; - if (input.substr(peg$currPos, 5) === peg$c323) { - s1 = peg$c323; + if (input.substr(peg$currPos, 5) === peg$c331) { + s1 = peg$c331; peg$currPos += 5; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c324); } + if (peg$silentFails === 0) { peg$fail(peg$c332); } } if (s1 !== peg$FAILED) { s2 = peg$parse_(); @@ -9869,12 +10248,12 @@ module.exports = (function() { } if (s0 === peg$FAILED) { s0 = peg$currPos; - if (input.substr(peg$currPos, 5) === peg$c325) { - s1 = peg$c325; + if (input.substr(peg$currPos, 5) === peg$c333) { + s1 = peg$c333; peg$currPos += 5; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c326); } + if (peg$silentFails === 0) { peg$fail(peg$c334); } } if (s1 !== peg$FAILED) { s2 = peg$parse_(); @@ -9891,12 +10270,12 @@ module.exports = (function() { } if (s0 === peg$FAILED) { s0 = peg$currPos; - if (input.substr(peg$currPos, 6) === peg$c327) { - s1 = peg$c327; + if (input.substr(peg$currPos, 6) === peg$c335) { + s1 = peg$c335; peg$currPos += 6; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c328); } + if (peg$silentFails === 0) { peg$fail(peg$c336); } } if (s1 !== peg$FAILED) { s2 = peg$parse_(); @@ -9913,12 +10292,12 @@ module.exports = (function() { } if (s0 === peg$FAILED) { s0 = peg$currPos; - if (input.substr(peg$currPos, 6) === peg$c329) { - s1 = peg$c329; + if (input.substr(peg$currPos, 6) === peg$c337) { + s1 = peg$c337; peg$currPos += 6; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c330); } + if (peg$silentFails === 0) { peg$fail(peg$c338); } } if (s1 !== peg$FAILED) { s2 = peg$parse_(); @@ -9935,12 +10314,12 @@ module.exports = (function() { } if (s0 === peg$FAILED) { s0 = peg$currPos; - if (input.substr(peg$currPos, 6) === peg$c331) { - s1 = peg$c331; + if (input.substr(peg$currPos, 6) === peg$c339) { + s1 = peg$c339; peg$currPos += 6; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c332); } + if (peg$silentFails === 0) { peg$fail(peg$c340); } } if (s1 !== peg$FAILED) { s2 = peg$parse_(); @@ -9957,12 +10336,12 @@ module.exports = (function() { } if (s0 === peg$FAILED) { s0 = peg$currPos; - if (input.substr(peg$currPos, 6) === peg$c333) { - s1 = peg$c333; + if (input.substr(peg$currPos, 6) === peg$c341) { + s1 = peg$c341; peg$currPos += 6; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c334); } + if (peg$silentFails === 0) { peg$fail(peg$c342); } } if (s1 !== peg$FAILED) { s2 = peg$parse_(); @@ -9979,12 +10358,12 @@ module.exports = (function() { } if (s0 === peg$FAILED) { s0 = peg$currPos; - if (input.substr(peg$currPos, 7) === peg$c335) { - s1 = peg$c335; + if (input.substr(peg$currPos, 7) === peg$c343) { + s1 = peg$c343; peg$currPos += 7; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c336); } + if (peg$silentFails === 0) { peg$fail(peg$c344); } } if (s1 !== peg$FAILED) { s2 = peg$parse_(); @@ -10001,12 +10380,12 @@ module.exports = (function() { } if (s0 === peg$FAILED) { s0 = peg$currPos; - if (input.substr(peg$currPos, 7) === peg$c337) { - s1 = peg$c337; + if (input.substr(peg$currPos, 7) === peg$c345) { + s1 = peg$c345; peg$currPos += 7; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c338); } + if (peg$silentFails === 0) { peg$fail(peg$c346); } } if (s1 !== peg$FAILED) { s2 = peg$parse_(); @@ -10022,12 +10401,12 @@ module.exports = (function() { s0 = peg$FAILED; } if (s0 === peg$FAILED) { - if (input.substr(peg$currPos, 7) === peg$c339) { - s0 = peg$c339; + if (input.substr(peg$currPos, 7) === peg$c347) { + s0 = peg$c347; peg$currPos += 7; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c340); } + if (peg$silentFails === 0) { peg$fail(peg$c348); } } } } @@ -10047,7 +10426,7 @@ module.exports = (function() { function peg$parseSUP() { var s0, s1, s2; - var key = peg$currPos * 115 + 86, + var key = peg$currPos * 121 + 92, cached = peg$resultsCache[key]; if (cached) { @@ -10086,7 +10465,7 @@ module.exports = (function() { function peg$parseSUB() { var s0, s1, s2; - var key = peg$currPos * 115 + 87, + var key = peg$currPos * 121 + 93, cached = peg$resultsCache[key]; if (cached) { @@ -10125,7 +10504,7 @@ module.exports = (function() { function peg$parsegeneric_func() { var s0, s1, s2, s3; - var key = peg$currPos * 115 + 88, + var key = peg$currPos * 121 + 94, cached = peg$resultsCache[key]; if (cached) { @@ -10136,11 +10515,11 @@ module.exports = (function() { s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 92) { - s1 = peg$c249; + s1 = peg$c253; peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c250); } + if (peg$silentFails === 0) { peg$fail(peg$c254); } } if (s1 !== peg$FAILED) { s2 = []; @@ -10155,7 +10534,7 @@ module.exports = (function() { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c155(); + s1 = peg$c159(); s0 = s1; } else { peg$currPos = s0; @@ -10174,7 +10553,7 @@ module.exports = (function() { function peg$parseBIG() { var s0, s1, s2, s3; - var key = peg$currPos * 115 + 89, + var key = peg$currPos * 121 + 95, cached = peg$resultsCache[key]; if (cached) { @@ -10187,7 +10566,7 @@ module.exports = (function() { s1 = peg$parsegeneric_func(); if (s1 !== peg$FAILED) { peg$savedPos = peg$currPos; - s2 = peg$c341(s1); + s2 = peg$c349(s1); if (s2) { s2 = void 0; } else { @@ -10197,7 +10576,7 @@ module.exports = (function() { s3 = peg$parse_(); if (s3 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c267(s1); + s1 = peg$c271(s1); s0 = s1; } else { peg$currPos = s0; @@ -10220,7 +10599,7 @@ module.exports = (function() { function peg$parsePAREN() { var s0, s1, s2, s3, s4; - var key = peg$currPos * 115 + 90, + var key = peg$currPos * 121 + 96, cached = peg$resultsCache[key]; if (cached) { @@ -10233,7 +10612,7 @@ module.exports = (function() { s1 = peg$parsegeneric_func(); if (s1 !== peg$FAILED) { peg$savedPos = peg$currPos; - s2 = peg$c342(s1); + s2 = peg$c350(s1); if (s2) { s2 = void 0; } else { @@ -10248,7 +10627,7 @@ module.exports = (function() { } if (s3 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c267(s1); + s1 = peg$c271(s1); s0 = s1; } else { peg$currPos = s0; @@ -10271,7 +10650,7 @@ module.exports = (function() { function peg$parseFUN_AR1() { var s0, s1, s2, s3, s4; - var key = peg$currPos * 115 + 91, + var key = peg$currPos * 121 + 97, cached = peg$resultsCache[key]; if (cached) { @@ -10284,7 +10663,7 @@ module.exports = (function() { s1 = peg$parsegeneric_func(); if (s1 !== peg$FAILED) { peg$savedPos = peg$currPos; - s2 = peg$c343(s1); + s2 = peg$c351(s1); if (s2) { s2 = void 0; } else { @@ -10299,7 +10678,7 @@ module.exports = (function() { } if (s3 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c267(s1); + s1 = peg$c271(s1); s0 = s1; } else { peg$currPos = s0; @@ -10318,7 +10697,7 @@ module.exports = (function() { s1 = peg$parsegeneric_func(); if (s1 !== peg$FAILED) { peg$savedPos = peg$currPos; - s2 = peg$c344(s1); + s2 = peg$c352(s1); if (s2) { s2 = void 0; } else { @@ -10333,7 +10712,7 @@ module.exports = (function() { } if (s3 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c344(s1); + s1 = peg$c352(s1); s0 = s1; } else { peg$currPos = s0; @@ -10357,7 +10736,7 @@ module.exports = (function() { function peg$parseFUN_AR2() { var s0, s1, s2, s3, s4; - var key = peg$currPos * 115 + 92, + var key = peg$currPos * 121 + 98, cached = peg$resultsCache[key]; if (cached) { @@ -10370,7 +10749,7 @@ module.exports = (function() { s1 = peg$parsegeneric_func(); if (s1 !== peg$FAILED) { peg$savedPos = peg$currPos; - s2 = peg$c345(s1); + s2 = peg$c353(s1); if (s2) { s2 = void 0; } else { @@ -10385,7 +10764,7 @@ module.exports = (function() { } if (s3 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c267(s1); + s1 = peg$c271(s1); s0 = s1; } else { peg$currPos = s0; @@ -10408,7 +10787,7 @@ module.exports = (function() { function peg$parseFUN_AR3() { var s0, s1, s2, s3, s4; - var key = peg$currPos * 115 + 93, + var key = peg$currPos * 121 + 99, cached = peg$resultsCache[key]; if (cached) { @@ -10421,7 +10800,7 @@ module.exports = (function() { s1 = peg$parsegeneric_func(); if (s1 !== peg$FAILED) { peg$savedPos = peg$currPos; - s2 = peg$c346(s1); + s2 = peg$c354(s1); if (s2) { s2 = void 0; } else { @@ -10436,7 +10815,7 @@ module.exports = (function() { } if (s3 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c267(s1); + s1 = peg$c271(s1); s0 = s1; } else { peg$currPos = s0; @@ -10459,7 +10838,7 @@ module.exports = (function() { function peg$parseFUN_INFIX() { var s0, s1, s2, s3; - var key = peg$currPos * 115 + 94, + var key = peg$currPos * 121 + 100, cached = peg$resultsCache[key]; if (cached) { @@ -10472,7 +10851,7 @@ module.exports = (function() { s1 = peg$parsegeneric_func(); if (s1 !== peg$FAILED) { peg$savedPos = peg$currPos; - s2 = peg$c347(s1); + s2 = peg$c355(s1); if (s2) { s2 = void 0; } else { @@ -10482,7 +10861,7 @@ module.exports = (function() { s3 = peg$parse_(); if (s3 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c267(s1); + s1 = peg$c271(s1); s0 = s1; } else { peg$currPos = s0; @@ -10505,7 +10884,7 @@ module.exports = (function() { function peg$parseJACOBI() { var s0, s1, s2, s3, s4; - var key = peg$currPos * 115 + 95, + var key = peg$currPos * 121 + 101, cached = peg$resultsCache[key]; if (cached) { @@ -10518,7 +10897,7 @@ module.exports = (function() { s1 = peg$parsegeneric_func(); if (s1 !== peg$FAILED) { peg$savedPos = peg$currPos; - s2 = peg$c348(s1); + s2 = peg$c356(s1); if (s2) { s2 = void 0; } else { @@ -10533,7 +10912,7 @@ module.exports = (function() { } if (s3 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c267(s1); + s1 = peg$c271(s1); s0 = s1; } else { peg$currPos = s0; @@ -10556,7 +10935,7 @@ module.exports = (function() { function peg$parseLAGUERRE() { var s0, s1, s2, s3, s4; - var key = peg$currPos * 115 + 96, + var key = peg$currPos * 121 + 102, cached = peg$resultsCache[key]; if (cached) { @@ -10569,7 +10948,7 @@ module.exports = (function() { s1 = peg$parsegeneric_func(); if (s1 !== peg$FAILED) { peg$savedPos = peg$currPos; - s2 = peg$c349(s1); + s2 = peg$c357(s1); if (s2) { s2 = void 0; } else { @@ -10584,7 +10963,7 @@ module.exports = (function() { } if (s3 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c267(s1); + s1 = peg$c271(s1); s0 = s1; } else { peg$currPos = s0; @@ -10607,7 +10986,7 @@ module.exports = (function() { function peg$parseEJACOBI() { var s0; - var key = peg$currPos * 115 + 97, + var key = peg$currPos * 121 + 103, cached = peg$resultsCache[key]; if (cached) { @@ -10616,28 +10995,28 @@ module.exports = (function() { return cached.result; } - if (input.substr(peg$currPos, 2) === peg$c350) { - s0 = peg$c350; + if (input.substr(peg$currPos, 2) === peg$c358) { + s0 = peg$c358; peg$currPos += 2; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c351); } + if (peg$silentFails === 0) { peg$fail(peg$c359); } } if (s0 === peg$FAILED) { - if (input.substr(peg$currPos, 2) === peg$c352) { - s0 = peg$c352; + if (input.substr(peg$currPos, 2) === peg$c360) { + s0 = peg$c360; peg$currPos += 2; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c353); } + if (peg$silentFails === 0) { peg$fail(peg$c361); } } if (s0 === peg$FAILED) { - if (input.substr(peg$currPos, 2) === peg$c354) { - s0 = peg$c354; + if (input.substr(peg$currPos, 2) === peg$c362) { + s0 = peg$c362; peg$currPos += 2; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c355); } + if (peg$silentFails === 0) { peg$fail(peg$c363); } } } } @@ -10650,7 +11029,7 @@ module.exports = (function() { function peg$parseDECLh() { var s0, s1, s2, s3; - var key = peg$currPos * 115 + 98, + var key = peg$currPos * 121 + 104, cached = peg$resultsCache[key]; if (cached) { @@ -10663,7 +11042,7 @@ module.exports = (function() { s1 = peg$parsegeneric_func(); if (s1 !== peg$FAILED) { peg$savedPos = peg$currPos; - s2 = peg$c356(s1); + s2 = peg$c364(s1); if (s2) { s2 = void 0; } else { @@ -10673,7 +11052,7 @@ module.exports = (function() { s3 = peg$parse_(); if (s3 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c357(s1); + s1 = peg$c365(s1); s0 = s1; } else { peg$currPos = s0; @@ -10696,7 +11075,7 @@ module.exports = (function() { function peg$parseFUN_AR2nb() { var s0, s1, s2, s3, s4; - var key = peg$currPos * 115 + 99, + var key = peg$currPos * 121 + 105, cached = peg$resultsCache[key]; if (cached) { @@ -10709,7 +11088,7 @@ module.exports = (function() { s1 = peg$parsegeneric_func(); if (s1 !== peg$FAILED) { peg$savedPos = peg$currPos; - s2 = peg$c358(s1); + s2 = peg$c366(s1); if (s2) { s2 = void 0; } else { @@ -10724,7 +11103,7 @@ module.exports = (function() { } if (s3 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c267(s1); + s1 = peg$c271(s1); s0 = s1; } else { peg$currPos = s0; @@ -10747,7 +11126,7 @@ module.exports = (function() { function peg$parseLEFT() { var s0, s1, s2, s3; - var key = peg$currPos * 115 + 100, + var key = peg$currPos * 121 + 106, cached = peg$resultsCache[key]; if (cached) { @@ -10760,7 +11139,7 @@ module.exports = (function() { s1 = peg$parsegeneric_func(); if (s1 !== peg$FAILED) { peg$savedPos = peg$currPos; - s2 = peg$c359(s1); + s2 = peg$c367(s1); if (s2) { s2 = void 0; } else { @@ -10792,7 +11171,7 @@ module.exports = (function() { function peg$parseRIGHT() { var s0, s1, s2, s3; - var key = peg$currPos * 115 + 101, + var key = peg$currPos * 121 + 107, cached = peg$resultsCache[key]; if (cached) { @@ -10805,7 +11184,7 @@ module.exports = (function() { s1 = peg$parsegeneric_func(); if (s1 !== peg$FAILED) { peg$savedPos = peg$currPos; - s2 = peg$c360(s1); + s2 = peg$c368(s1); if (s2) { s2 = void 0; } else { @@ -10837,7 +11216,7 @@ module.exports = (function() { function peg$parseHLINE() { var s0, s1, s2, s3; - var key = peg$currPos * 115 + 102, + var key = peg$currPos * 121 + 108, cached = peg$resultsCache[key]; if (cached) { @@ -10850,7 +11229,7 @@ module.exports = (function() { s1 = peg$parsegeneric_func(); if (s1 !== peg$FAILED) { peg$savedPos = peg$currPos; - s2 = peg$c361(s1); + s2 = peg$c369(s1); if (s2) { s2 = void 0; } else { @@ -10860,7 +11239,7 @@ module.exports = (function() { s3 = peg$parse_(); if (s3 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c267(s1); + s1 = peg$c271(s1); s0 = s1; } else { peg$currPos = s0; @@ -10883,7 +11262,7 @@ module.exports = (function() { function peg$parseCOLOR() { var s0, s1, s2, s3, s4; - var key = peg$currPos * 115 + 103, + var key = peg$currPos * 121 + 109, cached = peg$resultsCache[key]; if (cached) { @@ -10896,7 +11275,7 @@ module.exports = (function() { s1 = peg$parsegeneric_func(); if (s1 !== peg$FAILED) { peg$savedPos = peg$currPos; - s2 = peg$c362(s1); + s2 = peg$c370(s1); if (s2) { s2 = void 0; } else { @@ -10908,7 +11287,7 @@ module.exports = (function() { s4 = peg$parseCOLOR_SPEC(); if (s4 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c363(s1, s4); + s1 = peg$c371(s1, s4); s0 = s1; } else { peg$currPos = s0; @@ -10935,7 +11314,7 @@ module.exports = (function() { function peg$parseDEFINECOLOR() { var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, s14, s15, s16, s17; - var key = peg$currPos * 115 + 104, + var key = peg$currPos * 121 + 110, cached = peg$resultsCache[key]; if (cached) { @@ -10948,7 +11327,7 @@ module.exports = (function() { s1 = peg$parsegeneric_func(); if (s1 !== peg$FAILED) { peg$savedPos = peg$currPos; - s2 = peg$c364(s1); + s2 = peg$c372(s1); if (s2) { s2 = void 0; } else { @@ -11001,12 +11380,12 @@ module.exports = (function() { s11 = peg$parse_(); if (s11 !== peg$FAILED) { s12 = peg$currPos; - if (input.substr(peg$currPos, 5).toLowerCase() === peg$c365) { + if (input.substr(peg$currPos, 5).toLowerCase() === peg$c373) { s13 = input.substr(peg$currPos, 5); peg$currPos += 5; } else { s13 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c366); } + if (peg$silentFails === 0) { peg$fail(peg$c374); } } if (s13 !== peg$FAILED) { s14 = peg$parse_(); @@ -11024,7 +11403,7 @@ module.exports = (function() { s17 = peg$parseCOLOR_SPEC_NAMED(); if (s17 !== peg$FAILED) { peg$savedPos = s12; - s13 = peg$c367(s1, s6, s17); + s13 = peg$c375(s1, s6, s17); s12 = s13; } else { peg$currPos = s12; @@ -11048,12 +11427,12 @@ module.exports = (function() { } if (s12 === peg$FAILED) { s12 = peg$currPos; - if (input.substr(peg$currPos, 4).toLowerCase() === peg$c368) { + if (input.substr(peg$currPos, 4).toLowerCase() === peg$c376) { s13 = input.substr(peg$currPos, 4); peg$currPos += 4; } else { s13 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c369); } + if (peg$silentFails === 0) { peg$fail(peg$c377); } } if (s13 !== peg$FAILED) { s14 = peg$parse_(); @@ -11071,7 +11450,7 @@ module.exports = (function() { s17 = peg$parseCOLOR_SPEC_GRAY(); if (s17 !== peg$FAILED) { peg$savedPos = s12; - s13 = peg$c370(s1, s6, s17); + s13 = peg$c378(s1, s6, s17); s12 = s13; } else { peg$currPos = s12; @@ -11095,12 +11474,12 @@ module.exports = (function() { } if (s12 === peg$FAILED) { s12 = peg$currPos; - if (input.substr(peg$currPos, 3) === peg$c371) { - s13 = peg$c371; + if (input.substr(peg$currPos, 3) === peg$c379) { + s13 = peg$c379; peg$currPos += 3; } else { s13 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c372); } + if (peg$silentFails === 0) { peg$fail(peg$c380); } } if (s13 !== peg$FAILED) { s14 = peg$parse_(); @@ -11118,7 +11497,7 @@ module.exports = (function() { s17 = peg$parseCOLOR_SPEC_rgb(); if (s17 !== peg$FAILED) { peg$savedPos = s12; - s13 = peg$c373(s1, s6, s17); + s13 = peg$c381(s1, s6, s17); s12 = s13; } else { peg$currPos = s12; @@ -11142,12 +11521,12 @@ module.exports = (function() { } if (s12 === peg$FAILED) { s12 = peg$currPos; - if (input.substr(peg$currPos, 3) === peg$c374) { - s13 = peg$c374; + if (input.substr(peg$currPos, 3) === peg$c382) { + s13 = peg$c382; peg$currPos += 3; } else { s13 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c375); } + if (peg$silentFails === 0) { peg$fail(peg$c383); } } if (s13 !== peg$FAILED) { s14 = peg$parse_(); @@ -11165,7 +11544,7 @@ module.exports = (function() { s17 = peg$parseCOLOR_SPEC_RGB(); if (s17 !== peg$FAILED) { peg$savedPos = s12; - s13 = peg$c373(s1, s6, s17); + s13 = peg$c381(s1, s6, s17); s12 = s13; } else { peg$currPos = s12; @@ -11189,12 +11568,12 @@ module.exports = (function() { } if (s12 === peg$FAILED) { s12 = peg$currPos; - if (input.substr(peg$currPos, 4).toLowerCase() === peg$c376) { + if (input.substr(peg$currPos, 4).toLowerCase() === peg$c384) { s13 = input.substr(peg$currPos, 4); peg$currPos += 4; } else { s13 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c377); } + if (peg$silentFails === 0) { peg$fail(peg$c385); } } if (s13 !== peg$FAILED) { s14 = peg$parse_(); @@ -11212,7 +11591,7 @@ module.exports = (function() { s17 = peg$parseCOLOR_SPEC_CMYK(); if (s17 !== peg$FAILED) { peg$savedPos = s12; - s13 = peg$c378(s1, s6, s17); + s13 = peg$c386(s1, s6, s17); s12 = s13; } else { peg$currPos = s12; @@ -11240,7 +11619,7 @@ module.exports = (function() { } if (s12 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c379(s1, s6, s12); + s1 = peg$c387(s1, s6, s12); s0 = s1; } else { peg$currPos = s0; @@ -11299,7 +11678,7 @@ module.exports = (function() { function peg$parseCOLOR_SPEC() { var s0, s1, s2, s3, s4, s5, s6, s7; - var key = peg$currPos * 115 + 105, + var key = peg$currPos * 121 + 111, cached = peg$resultsCache[key]; if (cached) { @@ -11321,12 +11700,12 @@ module.exports = (function() { if (s1 !== peg$FAILED) { s2 = peg$parse_(); if (s2 !== peg$FAILED) { - if (input.substr(peg$currPos, 5).toLowerCase() === peg$c365) { + if (input.substr(peg$currPos, 5).toLowerCase() === peg$c373) { s3 = input.substr(peg$currPos, 5); peg$currPos += 5; } else { s3 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c366); } + if (peg$silentFails === 0) { peg$fail(peg$c374); } } if (s3 !== peg$FAILED) { s4 = peg$parse_(); @@ -11344,7 +11723,7 @@ module.exports = (function() { s7 = peg$parseCOLOR_SPEC_NAMED(); if (s7 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c380(s7); + s1 = peg$c388(s7); s0 = s1; } else { peg$currPos = s0; @@ -11386,12 +11765,12 @@ module.exports = (function() { if (s1 !== peg$FAILED) { s2 = peg$parse_(); if (s2 !== peg$FAILED) { - if (input.substr(peg$currPos, 4).toLowerCase() === peg$c368) { + if (input.substr(peg$currPos, 4).toLowerCase() === peg$c376) { s3 = input.substr(peg$currPos, 4); peg$currPos += 4; } else { s3 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c369); } + if (peg$silentFails === 0) { peg$fail(peg$c377); } } if (s3 !== peg$FAILED) { s4 = peg$parse_(); @@ -11409,7 +11788,7 @@ module.exports = (function() { s7 = peg$parseCOLOR_SPEC_GRAY(); if (s7 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c381(s7); + s1 = peg$c389(s7); s0 = s1; } else { peg$currPos = s0; @@ -11451,12 +11830,12 @@ module.exports = (function() { if (s1 !== peg$FAILED) { s2 = peg$parse_(); if (s2 !== peg$FAILED) { - if (input.substr(peg$currPos, 3) === peg$c371) { - s3 = peg$c371; + if (input.substr(peg$currPos, 3) === peg$c379) { + s3 = peg$c379; peg$currPos += 3; } else { s3 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c372); } + if (peg$silentFails === 0) { peg$fail(peg$c380); } } if (s3 !== peg$FAILED) { s4 = peg$parse_(); @@ -11474,7 +11853,7 @@ module.exports = (function() { s7 = peg$parseCOLOR_SPEC_rgb(); if (s7 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c382(s7); + s1 = peg$c390(s7); s0 = s1; } else { peg$currPos = s0; @@ -11516,12 +11895,12 @@ module.exports = (function() { if (s1 !== peg$FAILED) { s2 = peg$parse_(); if (s2 !== peg$FAILED) { - if (input.substr(peg$currPos, 3) === peg$c374) { - s3 = peg$c374; + if (input.substr(peg$currPos, 3) === peg$c382) { + s3 = peg$c382; peg$currPos += 3; } else { s3 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c375); } + if (peg$silentFails === 0) { peg$fail(peg$c383); } } if (s3 !== peg$FAILED) { s4 = peg$parse_(); @@ -11539,7 +11918,7 @@ module.exports = (function() { s7 = peg$parseCOLOR_SPEC_RGB(); if (s7 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c382(s7); + s1 = peg$c390(s7); s0 = s1; } else { peg$currPos = s0; @@ -11581,12 +11960,12 @@ module.exports = (function() { if (s1 !== peg$FAILED) { s2 = peg$parse_(); if (s2 !== peg$FAILED) { - if (input.substr(peg$currPos, 4).toLowerCase() === peg$c376) { + if (input.substr(peg$currPos, 4).toLowerCase() === peg$c384) { s3 = input.substr(peg$currPos, 4); peg$currPos += 4; } else { s3 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c377); } + if (peg$silentFails === 0) { peg$fail(peg$c385); } } if (s3 !== peg$FAILED) { s4 = peg$parse_(); @@ -11604,7 +11983,7 @@ module.exports = (function() { s7 = peg$parseCOLOR_SPEC_CMYK(); if (s7 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c383(s7); + s1 = peg$c391(s7); s0 = s1; } else { peg$currPos = s0; @@ -11648,7 +12027,7 @@ module.exports = (function() { function peg$parseCOLOR_SPEC_NAMED() { var s0, s1, s2, s3, s4, s5, s6; - var key = peg$currPos * 115 + 106, + var key = peg$currPos * 121 + 112, cached = peg$resultsCache[key]; if (cached) { @@ -11692,7 +12071,7 @@ module.exports = (function() { s6 = peg$parse_(); if (s6 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c384(s3); + s1 = peg$c392(s3); s0 = s1; } else { peg$currPos = s0; @@ -11727,7 +12106,7 @@ module.exports = (function() { function peg$parseCOLOR_SPEC_GRAY() { var s0, s1, s2, s3, s4; - var key = peg$currPos * 115 + 107, + var key = peg$currPos * 121 + 113, cached = peg$resultsCache[key]; if (cached) { @@ -11767,7 +12146,7 @@ module.exports = (function() { } if (s4 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c385(s3); + s1 = peg$c393(s3); s0 = s1; } else { peg$currPos = s0; @@ -11794,7 +12173,7 @@ module.exports = (function() { function peg$parseCOLOR_SPEC_rgb() { var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11; - var key = peg$currPos * 115 + 108, + var key = peg$currPos * 121 + 114, cached = peg$resultsCache[key]; if (cached) { @@ -11851,7 +12230,7 @@ module.exports = (function() { s11 = peg$parse_(); if (s11 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c386(s3, s6, s9); + s1 = peg$c394(s3, s6, s9); s0 = s1; } else { peg$currPos = s0; @@ -11906,7 +12285,7 @@ module.exports = (function() { function peg$parseCOLOR_SPEC_RGB() { var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11; - var key = peg$currPos * 115 + 109, + var key = peg$currPos * 121 + 115, cached = peg$resultsCache[key]; if (cached) { @@ -11963,7 +12342,7 @@ module.exports = (function() { s11 = peg$parse_(); if (s11 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c386(s3, s6, s9); + s1 = peg$c394(s3, s6, s9); s0 = s1; } else { peg$currPos = s0; @@ -12018,7 +12397,7 @@ module.exports = (function() { function peg$parseCOLOR_SPEC_CMYK() { var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, s14; - var key = peg$currPos * 115 + 110, + var key = peg$currPos * 121 + 116, cached = peg$resultsCache[key]; if (cached) { @@ -12087,7 +12466,7 @@ module.exports = (function() { s14 = peg$parse_(); if (s14 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c387(s3, s6, s9, s12); + s1 = peg$c395(s3, s6, s9, s12); s0 = s1; } else { peg$currPos = s0; @@ -12154,7 +12533,7 @@ module.exports = (function() { function peg$parseCNUM255() { var s0, s1, s2, s3, s4, s5, s6; - var key = peg$currPos * 115 + 111, + var key = peg$currPos * 121 + 117, cached = peg$resultsCache[key]; if (cached) { @@ -12166,37 +12545,37 @@ module.exports = (function() { s0 = peg$currPos; s1 = peg$currPos; if (input.charCodeAt(peg$currPos) === 48) { - s2 = peg$c388; + s2 = peg$c396; peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c389); } + if (peg$silentFails === 0) { peg$fail(peg$c397); } } if (s2 === peg$FAILED) { s2 = peg$currPos; - if (peg$c390.test(input.charAt(peg$currPos))) { + if (peg$c398.test(input.charAt(peg$currPos))) { s3 = input.charAt(peg$currPos); peg$currPos++; } else { s3 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c391); } + if (peg$silentFails === 0) { peg$fail(peg$c399); } } if (s3 !== peg$FAILED) { s4 = peg$currPos; - if (peg$c163.test(input.charAt(peg$currPos))) { + if (peg$c167.test(input.charAt(peg$currPos))) { s5 = input.charAt(peg$currPos); peg$currPos++; } else { s5 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c164); } + if (peg$silentFails === 0) { peg$fail(peg$c168); } } if (s5 !== peg$FAILED) { - if (peg$c163.test(input.charAt(peg$currPos))) { + if (peg$c167.test(input.charAt(peg$currPos))) { s6 = input.charAt(peg$currPos); peg$currPos++; } else { s6 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c164); } + if (peg$silentFails === 0) { peg$fail(peg$c168); } } if (s6 === peg$FAILED) { s6 = null; @@ -12234,7 +12613,7 @@ module.exports = (function() { } if (s1 !== peg$FAILED) { peg$savedPos = peg$currPos; - s2 = peg$c392(s1); + s2 = peg$c400(s1); if (s2) { s2 = void 0; } else { @@ -12244,7 +12623,7 @@ module.exports = (function() { s3 = peg$parse_(); if (s3 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c393(s1); + s1 = peg$c401(s1); s0 = s1; } else { peg$currPos = s0; @@ -12267,7 +12646,7 @@ module.exports = (function() { function peg$parseCNUM() { var s0, s1, s2, s3, s4, s5, s6; - var key = peg$currPos * 115 + 112, + var key = peg$currPos * 121 + 118, cached = peg$resultsCache[key]; if (cached) { @@ -12280,41 +12659,41 @@ module.exports = (function() { s1 = peg$currPos; s2 = peg$currPos; if (input.charCodeAt(peg$currPos) === 48) { - s3 = peg$c388; + s3 = peg$c396; peg$currPos++; } else { s3 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c389); } + if (peg$silentFails === 0) { peg$fail(peg$c397); } } if (s3 === peg$FAILED) { s3 = null; } if (s3 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 46) { - s4 = peg$c186; + s4 = peg$c190; peg$currPos++; } else { s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c187); } + if (peg$silentFails === 0) { peg$fail(peg$c191); } } if (s4 !== peg$FAILED) { s5 = []; - if (peg$c163.test(input.charAt(peg$currPos))) { + if (peg$c167.test(input.charAt(peg$currPos))) { s6 = input.charAt(peg$currPos); peg$currPos++; } else { s6 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c164); } + if (peg$silentFails === 0) { peg$fail(peg$c168); } } if (s6 !== peg$FAILED) { while (s6 !== peg$FAILED) { s5.push(s6); - if (peg$c163.test(input.charAt(peg$currPos))) { + if (peg$c167.test(input.charAt(peg$currPos))) { s6 = input.charAt(peg$currPos); peg$currPos++; } else { s6 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c164); } + if (peg$silentFails === 0) { peg$fail(peg$c168); } } } } else { @@ -12344,7 +12723,7 @@ module.exports = (function() { s2 = peg$parse_(); if (s2 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c394(s1); + s1 = peg$c402(s1); s0 = s1; } else { peg$currPos = s0; @@ -12358,20 +12737,20 @@ module.exports = (function() { s0 = peg$currPos; s1 = peg$currPos; s2 = peg$currPos; - if (peg$c395.test(input.charAt(peg$currPos))) { + if (peg$c403.test(input.charAt(peg$currPos))) { s3 = input.charAt(peg$currPos); peg$currPos++; } else { s3 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c396); } + if (peg$silentFails === 0) { peg$fail(peg$c404); } } if (s3 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 46) { - s4 = peg$c186; + s4 = peg$c190; peg$currPos++; } else { s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c187); } + if (peg$silentFails === 0) { peg$fail(peg$c191); } } if (s4 === peg$FAILED) { s4 = null; @@ -12396,7 +12775,7 @@ module.exports = (function() { s2 = peg$parse_(); if (s2 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c394(s1); + s1 = peg$c402(s1); s0 = s1; } else { peg$currPos = s0; @@ -12416,7 +12795,7 @@ module.exports = (function() { function peg$parseimpossible() { var s0; - var key = peg$currPos * 115 + 113, + var key = peg$currPos * 121 + 119, cached = peg$resultsCache[key]; if (cached) { @@ -12426,7 +12805,7 @@ module.exports = (function() { } peg$savedPos = peg$currPos; - s0 = peg$c397(); + s0 = peg$c405(); if (s0) { s0 = void 0; } else { @@ -12441,7 +12820,7 @@ module.exports = (function() { function peg$parseEOF() { var s0; - var key = peg$currPos * 115 + 114, + var key = peg$currPos * 121 + 120, cached = peg$resultsCache[key]; if (cached) { @@ -12451,7 +12830,7 @@ module.exports = (function() { } peg$savedPos = peg$currPos; - s0 = peg$c398(); + s0 = peg$c406(); if (s0) { s0 = void 0; } else { diff --git a/lib/parser.pegjs b/lib/parser.pegjs index 9ff9884..14ff0a3 100644 --- a/lib/parser.pegjs +++ b/lib/parser.pegjs @@ -218,6 +218,10 @@ lit { return ast.Tex.MATRIX("smallmatrix", lst2arr(m)); } / BEGIN_CASES m:matrix END_CASES { return ast.Tex.MATRIX("cases", lst2arr(m)); } + / BEGIN_MULTLINE m:multline END_MULTLINE + { return ast.Tex.MULTLINE("multline", lst2arr(m)); } + / BEGIN_MULTLINE_STAR m:multline END_MULTLINE_STAR + { return ast.Tex.MULTLINE("multline*", lst2arr(m)); } / "\\begin{" alpha+ "}" /* better error messages for unknown environments */ { throw new peg$SyntaxError("Illegal TeX function", [], text(), location()); } / f:generic_func &{ return !tu.all_functions[f]; } @@ -294,6 +298,10 @@ litstuff = //basically lit without DELIMITER or LITERAL as an option (replaced b { return ast.Tex.MATRIX("smallmatrix", lst2arr(m)); } / BEGIN_CASES m:matrix END_CASES { return ast.Tex.MATRIX("cases", lst2arr(m)); } + / BEGIN_MULTLINE m:multline END_MULTLINE + { return ast.Tex.MULTLINE("multline", lst2arr(m)); } + / BEGIN_MULTLINE_STAR m:multline END_MULTLINE_STAR + { return ast.Tex.MULTLINE("multline*", lst2arr(m)); } / "\\begin{" alpha+ "}" /* better error messages for unknown environments */ { throw new peg$SyntaxError("Illegal TeX function", [], text(), location()); } / f:generic_func &{ return !tu.all_functions[f]; } @@ -348,6 +356,15 @@ line = e:expr tail:( NEXT_CELL l:line { return l; } )? { return { head: e.toArray(), tail: tail }; } +multline + = l:mline_start tail:( NEXT_ROW m:multline { return m; } )? + { return { head: lst2arr(l), tail: tail }; } +mline_start + = f:HLINE m:mline_start + { m.head.unshift(ast.Tex.LITERAL(ast.RenderT.TEX_ONLY(f + " "))); return m; } + / e:expr + { return { head: e.toArray(), tail: null }; } + column_spec = CURLY_OPEN cs:(one_col+ { return text(); }) CURLY_CLOSE { return ast.Tex.CURLY([ast.Tex.LITERAL(ast.RenderT.TEX_ONLY(cs))]); } @@ -543,6 +560,14 @@ BEGIN_CASES = BEGIN "{cases}" _ END_CASES = END "{cases}" _ +BEGIN_MULTLINE + = BEGIN "{multline}" _ +END_MULTLINE + = END "{multline}" _ +BEGIN_MULTLINE_STAR + = BEGIN "{multline*}" _ +END_MULTLINE_STAR + = END "{multline*}" _ SQ_CLOSE = "]" _ diff --git a/lib/render.js b/lib/render.js index 34d7b7d..249e670 100644 --- a/lib/render.js +++ b/lib/render.js @@ -125,6 +125,10 @@ ast.Tex.defineVisitor("render_tex", { var render_matrix = function(m) { return m.map(render_line).join('\\\\'); }; return curlies("\\begin{"+t+"}" + render_matrix(m) + "\\end{"+t+"}"); }, + MULTLINE: function(t, m) { + var render_lines = function(l) { return l.map(render).join('\\\\'); }; + return "\\begin{"+t+"}" + render_lines(m) + "\\end{"+t+"}"; + }, LR: function(l, r, tl) { return "\\left" + l.tex_part() + render(tl) + "\\right" + r.tex_part(); } diff --git a/lib/texutil.js b/lib/texutil.js index 0344e5a..2943c22 100644 --- a/lib/texutil.js +++ b/lib/texutil.js @@ -788,6 +788,8 @@ module.exports.ams_required = arr2set([ "\\begin{alignedat}", "\\begin{smallmatrix}", "\\begin{cases}", + "\\begin{multline}", + "\\begin{multline*}", "\\ulcorner", "\\urcorner", From a22d3ba9f89b093ffb280a24e3116a4c062ff397 Mon Sep 17 00:00:00 2001 From: Jagan Prem Date: Thu, 11 Aug 2016 10:28:49 -0400 Subject: [PATCH 02/10] Remove parser.js from repository. --- .gitignore | 3 + lib/parser.js | 12885 ------------------------------------------------ 2 files changed, 3 insertions(+), 12885 deletions(-) delete mode 100644 lib/parser.js diff --git a/.gitignore b/.gitignore index 74ce094..d6697a6 100644 --- a/.gitignore +++ b/.gitignore @@ -50,3 +50,6 @@ crashlytics-build.properties # Semantic Macros lib/optionalFunctions.csv + +# Compiled pegJS code +lib/parser.js \ No newline at end of file diff --git a/lib/parser.js b/lib/parser.js deleted file mode 100644 index a1be205..0000000 --- a/lib/parser.js +++ /dev/null @@ -1,12885 +0,0 @@ -/* jshint latedef: false */ -module.exports = (function() { - "use strict"; - - /* - * Generated by PEG.js 0.9.0. - * - * http://pegjs.org/ - */ - - function peg$subclass(child, parent) { - /*jshint validthis:true, newcap:false*/ - function ctor() { this.constructor = child; } - ctor.prototype = parent.prototype; - child.prototype = new ctor(); - } - - function peg$SyntaxError(message, expected, found, location) { - /*jshint validthis:true, newcap:false*/ - this.message = message; - this.expected = expected; - this.found = found; - this.location = location; - this.name = "SyntaxError"; - - if (typeof Error.captureStackTrace === "function") { - Error.captureStackTrace(this, peg$SyntaxError); - } - } - - peg$subclass(peg$SyntaxError, Error); - - function peg$parse(input) { - /*jshint validthis:true, newcap:false*/ - var options = arguments.length > 1 ? arguments[1] : {}, - parser = this, - - peg$FAILED = {}, - - peg$startRuleFunctions = { start: peg$parsestart }, - peg$startRuleFunction = peg$parsestart, - - peg$c0 = function(t) { console.assert(t instanceof ast.LList); return t.toArray(); }, - peg$c1 = /^[ \t\n\r]/, - peg$c2 = { type: "class", value: "[ \\t\\n\\r]", description: "[ \\t\\n\\r]" }, - peg$c3 = "\\,", - peg$c4 = { type: "literal", value: "\\,", description: "\"\\\\,\"" }, - peg$c5 = "\\;", - peg$c6 = { type: "literal", value: "\\;", description: "\"\\\\;\"" }, - peg$c7 = "\\ ", - peg$c8 = { type: "literal", value: "\\ ", description: "\"\\\\ \"" }, - peg$c9 = "!", - peg$c10 = { type: "literal", value: "!", description: "\"!\"" }, - peg$c11 = "\\>", - peg$c12 = { type: "literal", value: "\\>", description: "\"\\\\>\"" }, - peg$c13 = "\\:", - peg$c14 = { type: "literal", value: "\\:", description: "\"\\\\:\"" }, - peg$c15 = "\\enspace", - peg$c16 = { type: "literal", value: "\\enspace", description: "\"\\\\enspace\"" }, - peg$c17 = "\\quad", - peg$c18 = { type: "literal", value: "\\quad", description: "\"\\\\quad\"" }, - peg$c19 = "\\qquad", - peg$c20 = { type: "literal", value: "\\qquad", description: "\"\\\\qquad\"" }, - peg$c21 = "\\thinspace", - peg$c22 = { type: "literal", value: "\\thinspace", description: "\"\\\\thinspace\"" }, - peg$c23 = "\\thinmuskip", - peg$c24 = { type: "literal", value: "\\thinmuskip", description: "\"\\\\thinmuskip\"" }, - peg$c25 = "\\medmuskip", - peg$c26 = { type: "literal", value: "\\medmuskip", description: "\"\\\\medmuskip\"" }, - peg$c27 = "\\thickmuskip", - peg$c28 = { type: "literal", value: "\\thickmuskip", description: "\"\\\\thickmuskip\"" }, - peg$c29 = "\\kern", - peg$c30 = { type: "literal", value: "\\kern", description: "\"\\\\kern\"" }, - peg$c31 = "\\hskip", - peg$c32 = { type: "literal", value: "\\hskip", description: "\"\\\\hskip\"" }, - peg$c33 = "\\hspace", - peg$c34 = { type: "literal", value: "\\hspace", description: "\"\\\\hspace\"" }, - peg$c35 = "{", - peg$c36 = { type: "literal", value: "{", description: "\"{\"" }, - peg$c37 = "}", - peg$c38 = { type: "literal", value: "}", description: "\"}\"" }, - peg$c39 = "~", - peg$c40 = { type: "literal", value: "~", description: "\"~\"" }, - peg$c41 = "\\hfill", - peg$c42 = { type: "literal", value: "\\hfill", description: "\"\\\\hfill\"" }, - peg$c43 = "\\hfil", - peg$c44 = { type: "literal", value: "\\hfil", description: "\"\\\\hfil\"" }, - peg$c45 = "\\hphantom", - peg$c46 = { type: "literal", value: "\\hphantom", description: "\"\\\\hphantom\"" }, - peg$c47 = function(e) { return e; }, - peg$c48 = function(e1, name, e2) { return ast.LList(ast.Tex.INFIX(name, e1.toArray(), e2.toArray())); }, - peg$c49 = function(e1, f, e2) { return ast.LList(ast.Tex.INFIXh(f[0], f[1], e1.toArray(), e2.toArray()));}, - peg$c50 = "", - peg$c51 = function() { return ast.LList.EMPTY; }, - peg$c52 = function(h, t) { return ast.LList(h, t); }, - peg$c53 = function(d, e) { return ast.LList(ast.Tex.DECLh(d[0], d[1], e.toArray())); }, - peg$c54 = function(l1, l2) { return ast.Tex.FQ(l1[0], l1[1], l2); }, - peg$c55 = function(l1, l2) { return ast.Tex.FQ(l1[0], l2, l1[1]); }, - peg$c56 = function(base, upi) { return ast.Tex.UQ(base, upi); }, - peg$c57 = function(base, downi) { return ast.Tex.DQ(base, downi); }, - peg$c58 = function() { return ast.Tex.LITERAL(sq_close_ri); }, - peg$c59 = function(l, e) { return ast.LList(l, e); }, - peg$c60 = function(l1, l2) { return ast.Tex.FQN(l1[0], l2); }, - peg$c61 = function(l) { return ast.Tex.UQN(l); }, - peg$c62 = function(l) { return ast.Tex.DQN(l); }, - peg$c63 = function(d) { return d; }, - peg$c64 = function() { return sq_close_ri; }, - peg$c65 = function(f, l) { return options.semanticlatex; }, - peg$c66 = function(f, l) { return ast.Tex.PAREN2(f, l); }, - peg$c67 = function(f, l) { return ast.Tex.PAREN1(f, l); }, - peg$c68 = "P_", - peg$c69 = { type: "literal", value: "P_", description: "\"P_\"" }, - peg$c70 = "^", - peg$c71 = { type: "literal", value: "^", description: "\"^\"" }, - peg$c72 = ",", - peg$c73 = { type: "literal", value: ",", description: "\",\"" }, - peg$c74 = function(l, l2, l3, l4) { return options.semanticlatex; }, - peg$c75 = function(l, l2, l3, l4) { return ast.Tex.JACOBI(l, l2, l3, l4); }, - peg$c76 = "L_", - peg$c77 = { type: "literal", value: "L_", description: "\"L_\"" }, - peg$c78 = function(l, l2, l3) { return options.semanticlatex; }, - peg$c79 = function(l, l2, l3) { return ast.Tex.LAGUERRE2(l, l2, l3); }, - peg$c80 = function(l, l2) { return options.semanticlatex; }, - peg$c81 = function(l, l2) { return ast.Tex.LAGUERRE1(l, l2); }, - peg$c82 = ";", - peg$c83 = { type: "literal", value: ";", description: "\";\"" }, - peg$c84 = "_", - peg$c85 = { type: "literal", value: "_", description: "\"_\"" }, - peg$c86 = function(l, l2, l3) { return ast.Tex.QPOCH(l, l2, l3); }, - peg$c87 = function(l1, l2) { return options.semanticlatex; }, - peg$c88 = function(l1, l2) { return ast.Tex.POCH(l1, l2); }, - peg$c89 = function(name, l) { return options.semanticlatex; }, - peg$c90 = function(name, l) { return ast.Tex.PAREN2(name, l); }, - peg$c91 = "\\rm", - peg$c92 = { type: "literal", value: "\\rm", description: "\"\\\\rm\"" }, - peg$c93 = function(e, l1, l2) { return options.semanticlatex; }, - peg$c94 = function(e, l1, l2) { return ast.Tex.EJACOBI(e, l1, l2); }, - peg$c95 = function(r) { return ast.Tex.LITERAL(r); }, - peg$c96 = function(f) { return tu.other_literals3[f]; }, - peg$c97 = function(f) { - var ast = peg$parse(tu.other_literals3[f]); - console.assert(Array.isArray(ast) && ast.length === 1); - return ast[0]; - }, - peg$c98 = function(b, r) { return ast.Tex.BIG(b, r); }, - peg$c99 = function(b) { return ast.Tex.BIG(b, sq_close_ri); }, - peg$c100 = function(l, e, r) { return ast.Tex.LR(l, r, e.toArray()); }, - peg$c101 = function(name, e, l) { return ast.Tex.FUN2sq(name, ast.Tex.CURLY(e.toArray()), l); }, - peg$c102 = function(name, l) { return ast.Tex.FUN1(name, l); }, - peg$c103 = function(name, l) { return ast.Tex.FUN1nb(name, l); }, - peg$c104 = function(name, l1, l2) { return ast.Tex.FUN2(name, l1, l2); }, - peg$c105 = function(name, l1, l2) { return ast.Tex.FUN2nb(name, l1, l2); }, - peg$c106 = function(name, l1, l2, l3) { return ast.Tex.FUN3(name, l1, l2, l3); }, - peg$c107 = function(f, l1, l2, l3, l4) { return options.semanticlatex; }, - peg$c108 = function(f, l1, l2, l3, l4) { return ast.Tex.JACOBI(l1, l2, l3, l4); }, - peg$c109 = function(f, l1, l2) { return options.semanticlatex; }, - peg$c110 = function(f, l1, l2) { return ast.Tex.LAGUERRE1(l1 ,l2); }, - peg$c111 = "[", - peg$c112 = { type: "literal", value: "[", description: "\"[\"" }, - peg$c113 = "]", - peg$c114 = { type: "literal", value: "]", description: "\"]\"" }, - peg$c115 = function(f, l1, l2, l3) { return options.semanticlatex; }, - peg$c116 = function(f, l1, l2, l3) { return ast.Tex.LAGUERRE2(l1, l2, l3); }, - peg$c117 = "\\Jacobi", - peg$c118 = { type: "literal", value: "\\Jacobi", description: "\"\\\\Jacobi\"" }, - peg$c119 = function(e) { return ast.Tex.CURLY(e.toArray()); }, - peg$c120 = function(e1, name, e2) { return ast.Tex.INFIX(name, e1.toArray(), e2.toArray()); }, - peg$c121 = function(e1, f, e2) { return ast.Tex.INFIXh(f[0], f[1], e1.toArray(), e2.toArray()); }, - peg$c122 = function(m) { return ast.Tex.MATRIX("matrix", lst2arr(m)); }, - peg$c123 = function(m) { return ast.Tex.MATRIX("pmatrix", lst2arr(m)); }, - peg$c124 = function(m) { return ast.Tex.MATRIX("bmatrix", lst2arr(m)); }, - peg$c125 = function(m) { return ast.Tex.MATRIX("Bmatrix", lst2arr(m)); }, - peg$c126 = function(m) { return ast.Tex.MATRIX("vmatrix", lst2arr(m)); }, - peg$c127 = function(m) { return ast.Tex.MATRIX("Vmatrix", lst2arr(m)); }, - peg$c128 = function(m) { return ast.Tex.MATRIX("array", lst2arr(m)); }, - peg$c129 = function(m) { return ast.Tex.MATRIX("aligned", lst2arr(m)); }, - peg$c130 = function(m) { return ast.Tex.MATRIX("alignedat", lst2arr(m)); }, - peg$c131 = function(m) { return ast.Tex.MATRIX("smallmatrix", lst2arr(m)); }, - peg$c132 = function(m) { return ast.Tex.MATRIX("cases", lst2arr(m)); }, - peg$c133 = function(m) { console.log("hi"); return ast.Tex.MULTLINE("multline", lst2arr(m)); }, - peg$c134 = function(m) { return ast.Tex.MULTLINE("multline*", lst2arr(m)); }, - peg$c135 = "\\begin{", - peg$c136 = { type: "literal", value: "\\begin{", description: "\"\\\\begin{\"" }, - peg$c137 = function() { throw new peg$SyntaxError("Illegal TeX function", [], text(), location()); }, - peg$c138 = function(f) { return !tu.all_functions[f]; }, - peg$c139 = function(f) { throw new peg$SyntaxError("Illegal TeX function", [], f, location()); }, - peg$c140 = function(f, l) { return ast.Tex.FUN1hl(f[0], f[1], l); }, - peg$c141 = function(f, l) { return ast.Tex.FUN1hf(f[0], f[1], l); }, - peg$c142 = function(f, l1, l2) { return ast.Tex.FUN2h(f[0], f[1], l1, l2); }, - peg$c143 = function(name, l1, l2, l3) { return options.semanticlatex; }, - peg$c144 = function(f) { throw new peg$SyntaxError("Illegal TeX function", [], text(), location()); }, - peg$c145 = function(l) { return ast.Tex.LITERAL(l); }, - peg$c146 = function(l) { return l; }, - peg$c147 = function(l) { return l;}, - peg$c148 = function(r) { - var c = 0; - var str = ""; - str = r.join(""); - while (c < r.join("").length) { //this code removes all the unneeded text and combines it together into one string. - if (str.indexOf("TEX_ONLY(\"") >= 0) { - str = str.replace("TEX_ONLY(\"", ""); - } - if (str.indexOf("\")") >= 0) { - str = str.replace("\")", ""); - } - c = c + 1; - } - return ast.Tex.LITERAL(ast.RenderT.TEX_ONLY(str)); }, - peg$c149 = function() { return ast.Tex.LITERAL(ast.RenderT.TEX_ONLY("")); }, - peg$c150 = function(cs, m) { m.head[0].unshift(cs); return m; }, - peg$c151 = function(as, m) { m.head[0].unshift(as); return m; }, - peg$c152 = function(l, m) { return m; }, - peg$c153 = function(l, tail) { return { head: lst2arr(l), tail: tail }; }, - peg$c154 = function(f, l) { l.head.unshift(ast.Tex.LITERAL(ast.RenderT.TEX_ONLY(f + " "))); return l;}, - peg$c155 = function(e, l) { return l; }, - peg$c156 = function(e, tail) { return { head: e.toArray(), tail: tail }; }, - peg$c157 = function(f, m) { m.head.unshift(ast.Tex.LITERAL(ast.RenderT.TEX_ONLY(f + " "))); return m; }, - peg$c158 = function(e) { return { head: e.toArray(), tail: null }; }, - peg$c159 = function() { return text(); }, - peg$c160 = function(cs) { return ast.Tex.CURLY([ast.Tex.LITERAL(ast.RenderT.TEX_ONLY(cs))]); }, - peg$c161 = /^[lrc]/, - peg$c162 = { type: "class", value: "[lrc]", description: "[lrc]" }, - peg$c163 = "p", - peg$c164 = { type: "literal", value: "p", description: "\"p\"" }, - peg$c165 = "*", - peg$c166 = { type: "literal", value: "*", description: "\"*\"" }, - peg$c167 = /^[0-9]/, - peg$c168 = { type: "class", value: "[0-9]", description: "[0-9]" }, - peg$c169 = "||", - peg$c170 = { type: "literal", value: "||", description: "\"||\"" }, - peg$c171 = "|", - peg$c172 = { type: "literal", value: "|", description: "\"|\"" }, - peg$c173 = "@", - peg$c174 = { type: "literal", value: "@", description: "\"@\"" }, - peg$c175 = function(num) { return ast.Tex.CURLY([ast.Tex.LITERAL(ast.RenderT.TEX_ONLY(num))]); }, - peg$c176 = /^[tcb]/, - peg$c177 = { type: "class", value: "[tcb]", description: "[tcb]" }, - peg$c178 = /^[a-zA-Z]/, - peg$c179 = { type: "class", value: "[a-zA-Z]", description: "[a-zA-Z]" }, - peg$c180 = /^[,:;?!']/, - peg$c181 = { type: "class", value: "[,:;?!\\']", description: "[,:;?!\\']" }, - peg$c182 = /^[().]/, - peg$c183 = { type: "class", value: "[().]", description: "[().]" }, - peg$c184 = /^[\-+*=]/, - peg$c185 = { type: "class", value: "[-+*=]", description: "[-+*=]" }, - peg$c186 = /^[\/|]/, - peg$c187 = { type: "class", value: "[\\/|]", description: "[\\/|]" }, - peg$c188 = "-", - peg$c189 = { type: "literal", value: "-", description: "\"-\"" }, - peg$c190 = ".", - peg$c191 = { type: "literal", value: ".", description: "\".\"" }, - peg$c192 = "pt", - peg$c193 = { type: "literal", value: "pt", description: "\"pt\"" }, - peg$c194 = "pc", - peg$c195 = { type: "literal", value: "pc", description: "\"pc\"" }, - peg$c196 = "in", - peg$c197 = { type: "literal", value: "in", description: "\"in\"" }, - peg$c198 = "cm", - peg$c199 = { type: "literal", value: "cm", description: "\"cm\"" }, - peg$c200 = "bp", - peg$c201 = { type: "literal", value: "bp", description: "\"bp\"" }, - peg$c202 = "mm", - peg$c203 = { type: "literal", value: "mm", description: "\"mm\"" }, - peg$c204 = "dd", - peg$c205 = { type: "literal", value: "dd", description: "\"dd\"" }, - peg$c206 = "cc", - peg$c207 = { type: "literal", value: "cc", description: "\"cc\"" }, - peg$c208 = "sp", - peg$c209 = { type: "literal", value: "sp", description: "\"sp\"" }, - peg$c210 = "ex", - peg$c211 = { type: "literal", value: "ex", description: "\"ex\"" }, - peg$c212 = "em", - peg$c213 = { type: "literal", value: "em", description: "\"em\"" }, - peg$c214 = "mu", - peg$c215 = { type: "literal", value: "mu", description: "\"mu\"" }, - peg$c216 = "px", - peg$c217 = { type: "literal", value: "px", description: "\"px\"" }, - peg$c218 = /^[@]/, - peg$c219 = { type: "class", value: "[@]", description: "[@]" }, - peg$c220 = /^[\-0-9a-zA-Z+*,=():\/;?.!'` \x80-\uD7FF\uE000-\uFFFF]/, - peg$c221 = { type: "class", value: "[-0-9a-zA-Z+*,=():\\/;?.!\\'` \\x80-\\ud7ff\\ue000-\\uffff]", description: "[-0-9a-zA-Z+*,=():\\/;?.!\\'` \\x80-\\ud7ff\\ue000-\\uffff]" }, - peg$c222 = /^[\uD800-\uDBFF]/, - peg$c223 = { type: "class", value: "[\\ud800-\\udbff]", description: "[\\ud800-\\udbff]" }, - peg$c224 = /^[\uDC00-\uDFFF]/, - peg$c225 = { type: "class", value: "[\\udc00-\\udfff]", description: "[\\udc00-\\udfff]" }, - peg$c226 = function(l, h) { return text(); }, - peg$c227 = function(b) { return tu.box_functions[b]; }, - peg$c228 = function(b, cs) { return ast.Tex.BOX(b, cs.join('')); }, - peg$c229 = function(c) { return ast.RenderT.TEX_ONLY(c); }, - peg$c230 = function(f) { return tu.latex_function_names[f]; }, - peg$c231 = "(", - peg$c232 = { type: "literal", value: "(", description: "\"(\"" }, - peg$c233 = "\\{", - peg$c234 = { type: "literal", value: "\\{", description: "\"\\\\{\"" }, - peg$c235 = function(f) { return " ";}, - peg$c236 = function(f, c) { return ast.RenderT.TEX_ONLY(f + c); }, - peg$c237 = function(f) { return tu.mediawiki_function_names[f]; }, - peg$c238 = function(f) { return "";}, - peg$c239 = function(f, c) { return ast.RenderT.TEX_ONLY("\\operatorname{" + f.slice(1) + "}" + c); }, - peg$c240 = function(f) { return tu.other_literals1[f]; }, - peg$c241 = function(f) { return ast.RenderT.TEX_ONLY(f + " "); }, - peg$c242 = function(f) { return options.usemathrm && tu.other_literals2[f]; }, - peg$c243 = function(f) { return ast.RenderT.TEX_ONLY("\\mathrm{" + f + "} "); }, - peg$c244 = function(mathrm) { return options.usemathrm && mathrm === "\\mathrm"; }, - peg$c245 = function(mathrm, f) { return options.usemathrm && tu.other_literals2[f]; }, - peg$c246 = function(mathrm, f) { return options.usemathrm && ast.RenderT.TEX_ONLY("\\mathrm{" + f + "} "); }, - peg$c247 = function(f) { return tu.other_literals2[f]; }, - peg$c248 = function(f) { return ast.RenderT.TEX_ONLY("\\mbox{" + f + "} "); }, - peg$c249 = function(mbox) { return mbox === "\\mbox"; }, - peg$c250 = function(mbox, f) { return tu.other_literals2[f]; }, - peg$c251 = function(mbox, f) { return ast.RenderT.TEX_ONLY("\\mbox{" + f + "} "); }, - peg$c252 = function(f) { return ast.RenderT.TEX_ONLY(f); }, - peg$c253 = "\\", - peg$c254 = { type: "literal", value: "\\", description: "\"\\\\\"" }, - peg$c255 = /^[, ;!_#%$&]/, - peg$c256 = { type: "class", value: "[, ;!_#%$&]", description: "[, ;!_#%$&]" }, - peg$c257 = function(c) { return ast.RenderT.TEX_ONLY("\\" + c); }, - peg$c258 = /^[><~]/, - peg$c259 = { type: "class", value: "[><~]", description: "[><~]" }, - peg$c260 = /^[%$]/, - peg$c261 = { type: "class", value: "[%$]", description: "[%$]" }, - peg$c262 = function(c) { return ast.RenderT.TEX_ONLY("\\" + c); /* escape dangerous chars */}, - peg$c263 = function(f) { return ast.RenderT.TEX_ONLY(tu.other_literals3[f] + " "); }, - peg$c264 = /^[{}|]/, - peg$c265 = { type: "class", value: "[{}|]", description: "[{}|]" }, - peg$c266 = function(f) { return tu.other_delimiters1[f]; }, - peg$c267 = function(f) { return tu.other_delimiters2[f]; }, - peg$c268 = function(f) { var p = peg$parse(tu.other_delimiters2[f]); - console.assert(Array.isArray(p) && p.length === 1); - console.assert(p[0].constructor === ast.Tex.LITERAL); - console.assert(p[0][0].constructor === ast.RenderT.TEX_ONLY); - return p[0][0]; - }, - peg$c269 = function(c) { return ast.RenderT.TEX_ONLY(""); }, - peg$c270 = function(f) { return tu.fun_ar1nb[f]; }, - peg$c271 = function(f) { return f; }, - peg$c272 = function(f) { return tu.fun_ar1opt[f]; }, - peg$c273 = "&", - peg$c274 = { type: "literal", value: "&", description: "\"&\"" }, - peg$c275 = "\\\\", - peg$c276 = { type: "literal", value: "\\\\", description: "\"\\\\\\\\\"" }, - peg$c277 = "\\begin", - peg$c278 = { type: "literal", value: "\\begin", description: "\"\\\\begin\"" }, - peg$c279 = "\\end", - peg$c280 = { type: "literal", value: "\\end", description: "\"\\\\end\"" }, - peg$c281 = "{matrix}", - peg$c282 = { type: "literal", value: "{matrix}", description: "\"{matrix}\"" }, - peg$c283 = "{pmatrix}", - peg$c284 = { type: "literal", value: "{pmatrix}", description: "\"{pmatrix}\"" }, - peg$c285 = "{bmatrix}", - peg$c286 = { type: "literal", value: "{bmatrix}", description: "\"{bmatrix}\"" }, - peg$c287 = "{Bmatrix}", - peg$c288 = { type: "literal", value: "{Bmatrix}", description: "\"{Bmatrix}\"" }, - peg$c289 = "{vmatrix}", - peg$c290 = { type: "literal", value: "{vmatrix}", description: "\"{vmatrix}\"" }, - peg$c291 = "{Vmatrix}", - peg$c292 = { type: "literal", value: "{Vmatrix}", description: "\"{Vmatrix}\"" }, - peg$c293 = "{array}", - peg$c294 = { type: "literal", value: "{array}", description: "\"{array}\"" }, - peg$c295 = "{align}", - peg$c296 = { type: "literal", value: "{align}", description: "\"{align}\"" }, - peg$c297 = "{aligned}", - peg$c298 = { type: "literal", value: "{aligned}", description: "\"{aligned}\"" }, - peg$c299 = "{alignat}", - peg$c300 = { type: "literal", value: "{alignat}", description: "\"{alignat}\"" }, - peg$c301 = "{alignedat}", - peg$c302 = { type: "literal", value: "{alignedat}", description: "\"{alignedat}\"" }, - peg$c303 = "{smallmatrix}", - peg$c304 = { type: "literal", value: "{smallmatrix}", description: "\"{smallmatrix}\"" }, - peg$c305 = "{cases}", - peg$c306 = { type: "literal", value: "{cases}", description: "\"{cases}\"" }, - peg$c307 = "{multline}", - peg$c308 = { type: "literal", value: "{multline}", description: "\"{multline}\"" }, - peg$c309 = "{multline*}", - peg$c310 = { type: "literal", value: "{multline*}", description: "\"{multline*}\"" }, - peg$c311 = "\\big(", - peg$c312 = { type: "literal", value: "\\big(", description: "\"\\\\big(\"" }, - peg$c313 = "\\Big(", - peg$c314 = { type: "literal", value: "\\Big(", description: "\"\\\\Big(\"" }, - peg$c315 = "\\bigg(", - peg$c316 = { type: "literal", value: "\\bigg(", description: "\"\\\\bigg(\"" }, - peg$c317 = "\\Bigg(", - peg$c318 = { type: "literal", value: "\\Bigg(", description: "\"\\\\Bigg(\"" }, - peg$c319 = "\\bigl(", - peg$c320 = { type: "literal", value: "\\bigl(", description: "\"\\\\bigl(\"" }, - peg$c321 = "\\Bigl(", - peg$c322 = { type: "literal", value: "\\Bigl(", description: "\"\\\\Bigl(\"" }, - peg$c323 = "\\bigg1(", - peg$c324 = { type: "literal", value: "\\bigg1(", description: "\"\\\\bigg1(\"" }, - peg$c325 = "\\Biggl(", - peg$c326 = { type: "literal", value: "\\Biggl(", description: "\"\\\\Biggl(\"" }, - peg$c327 = "\\left(", - peg$c328 = { type: "literal", value: "\\left(", description: "\"\\\\left(\"" }, - peg$c329 = ")", - peg$c330 = { type: "literal", value: ")", description: "\")\"" }, - peg$c331 = "\\big)", - peg$c332 = { type: "literal", value: "\\big)", description: "\"\\\\big)\"" }, - peg$c333 = "\\Big)", - peg$c334 = { type: "literal", value: "\\Big)", description: "\"\\\\Big)\"" }, - peg$c335 = "\\bigg)", - peg$c336 = { type: "literal", value: "\\bigg)", description: "\"\\\\bigg)\"" }, - peg$c337 = "\\Bigg)", - peg$c338 = { type: "literal", value: "\\Bigg)", description: "\"\\\\Bigg)\"" }, - peg$c339 = "\\bigr)", - peg$c340 = { type: "literal", value: "\\bigr)", description: "\"\\\\bigr)\"" }, - peg$c341 = "\\Bigr)", - peg$c342 = { type: "literal", value: "\\Bigr)", description: "\"\\\\Bigr)\"" }, - peg$c343 = "\\biggr)", - peg$c344 = { type: "literal", value: "\\biggr)", description: "\"\\\\biggr)\"" }, - peg$c345 = "\\Biggr)", - peg$c346 = { type: "literal", value: "\\Biggr)", description: "\"\\\\Biggr)\"" }, - peg$c347 = "\\right)", - peg$c348 = { type: "literal", value: "\\right)", description: "\"\\\\right)\"" }, - peg$c349 = function(f) { return tu.big_literals[f]; }, - peg$c350 = function(f) { return tu.paren[f]; }, - peg$c351 = function(f) { return tu.fun_ar1[f]; }, - peg$c352 = function(f) { return tu.other_fun_ar1[f]; }, - peg$c353 = function(f) { return tu.fun_ar2[f]; }, - peg$c354 = function(f) { return tu.fun_ar3[f]; }, - peg$c355 = function(f) { return tu.fun_infix[f]; }, - peg$c356 = function(f) { return tu.jacobi[f]; }, - peg$c357 = function(f) { return tu.laguerre[f]; }, - peg$c358 = "sn", - peg$c359 = { type: "literal", value: "sn", description: "\"sn\"" }, - peg$c360 = "cn", - peg$c361 = { type: "literal", value: "cn", description: "\"cn\"" }, - peg$c362 = "dn", - peg$c363 = { type: "literal", value: "dn", description: "\"dn\"" }, - peg$c364 = function(f) { return tu.declh_function[f]; }, - peg$c365 = function(f) { return ast.Tex.DECLh(f, ast.FontForce.RM(), []); /*see bug 54818*/ }, - peg$c366 = function(f) { return tu.fun_ar2nb[f]; }, - peg$c367 = function(f) { return tu.left_function[f]; }, - peg$c368 = function(f) { return tu.right_function[f]; }, - peg$c369 = function(f) { return tu.hline_function[f]; }, - peg$c370 = function(f) { return tu.color_function[f]; }, - peg$c371 = function(f, cs) { return f + cs; }, - peg$c372 = function(f) { return tu.definecolor_function[f]; }, - peg$c373 = "named", - peg$c374 = { type: "literal", value: "named", description: "\"named\"" }, - peg$c375 = function(f, name, cs) { return "{named}" + cs; }, - peg$c376 = "gray", - peg$c377 = { type: "literal", value: "gray", description: "\"gray\"" }, - peg$c378 = function(f, name, cs) { return "{gray}" + cs; }, - peg$c379 = "rgb", - peg$c380 = { type: "literal", value: "rgb", description: "\"rgb\"" }, - peg$c381 = function(f, name, cs) { return "{rgb}" + cs; }, - peg$c382 = "RGB", - peg$c383 = { type: "literal", value: "RGB", description: "\"RGB\"" }, - peg$c384 = "cmyk", - peg$c385 = { type: "literal", value: "cmyk", description: "\"cmyk\"" }, - peg$c386 = function(f, name, cs) { return "{cmyk}" + cs; }, - peg$c387 = function(f, name, a) { return f + "{" + name.join('') + "}" + a; }, - peg$c388 = function(cs) { return "[named]" + cs; }, - peg$c389 = function(cs) { return "[gray]" + cs; }, - peg$c390 = function(cs) { return "[rgb]" + cs; }, - peg$c391 = function(cs) { return "[cmyk]" + cs; }, - peg$c392 = function(name) { return "{" + name.join('') + "}"; }, - peg$c393 = function(k) { return "{"+k+"}"; }, - peg$c394 = function(r, g, b) { return "{"+r+","+g+","+b+"}"; }, - peg$c395 = function(c, m, y, k) { return "{"+c+","+m+","+y+","+k+"}"; }, - peg$c396 = "0", - peg$c397 = { type: "literal", value: "0", description: "\"0\"" }, - peg$c398 = /^[1-9]/, - peg$c399 = { type: "class", value: "[1-9]", description: "[1-9]" }, - peg$c400 = function(n) { return parseInt(n, 10) <= 255; }, - peg$c401 = function(n) { return n / 255; }, - peg$c402 = function(n) { return n; }, - peg$c403 = /^[01]/, - peg$c404 = { type: "class", value: "[01]", description: "[01]" }, - peg$c405 = function() { return false; }, - peg$c406 = function() { return peg$currPos === input.length; }, - - peg$currPos = 0, - peg$savedPos = 0, - peg$posDetailsCache = [{ line: 1, column: 1, seenCR: false }], - peg$maxFailPos = 0, - peg$maxFailExpected = [], - peg$silentFails = 0, - - peg$resultsCache = {}, - - peg$result; - - if ("startRule" in options) { - if (!(options.startRule in peg$startRuleFunctions)) { - throw new Error("Can't start parsing from rule \"" + options.startRule + "\"."); - } - - peg$startRuleFunction = peg$startRuleFunctions[options.startRule]; - } - - function text() { - return input.substring(peg$savedPos, peg$currPos); - } - - function location() { - return peg$computeLocation(peg$savedPos, peg$currPos); - } - - function expected(description) { - throw peg$buildException( - null, - [{ type: "other", description: description }], - input.substring(peg$savedPos, peg$currPos), - peg$computeLocation(peg$savedPos, peg$currPos) - ); - } - - function error(message) { - throw peg$buildException( - message, - null, - input.substring(peg$savedPos, peg$currPos), - peg$computeLocation(peg$savedPos, peg$currPos) - ); - } - - function peg$computePosDetails(pos) { - var details = peg$posDetailsCache[pos], - p, ch; - - if (details) { - return details; - } else { - p = pos - 1; - while (!peg$posDetailsCache[p]) { - p--; - } - - details = peg$posDetailsCache[p]; - details = { - line: details.line, - column: details.column, - seenCR: details.seenCR - }; - - while (p < pos) { - 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; - } - - p++; - } - - peg$posDetailsCache[pos] = details; - return details; - } - } - - function peg$computeLocation(startPos, endPos) { - var startPosDetails = peg$computePosDetails(startPos), - endPosDetails = peg$computePosDetails(endPos); - - return { - start: { - offset: startPos, - line: startPosDetails.line, - column: startPosDetails.column - }, - end: { - offset: endPos, - line: endPosDetails.line, - column: endPosDetails.column - } - }; - } - - function peg$fail(expected) { - if (peg$currPos < peg$maxFailPos) { return; } - - if (peg$currPos > peg$maxFailPos) { - peg$maxFailPos = peg$currPos; - peg$maxFailExpected = []; - } - - peg$maxFailExpected.push(expected); - } - - function peg$buildException(message, expected, found, location) { - function cleanupExpected(expected) { - var i = 1; - - expected.sort(function(a, b) { - if (a.description < b.description) { - return -1; - } else if (a.description > b.description) { - return 1; - } else { - return 0; - } - }); - - while (i < expected.length) { - if (expected[i - 1] === expected[i]) { - expected.splice(i, 1); - } else { - i++; - } - } - } - - 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(/[\u0100-\u0FFF]/g, function(ch) { return '\\u0' + hex(ch); }) - .replace(/[\u1000-\uFFFF]/g, function(ch) { return '\\u' + hex(ch); }); - } - - var expectedDescs = new Array(expected.length), - expectedDesc, foundDesc, i; - - for (i = 0; i < expected.length; i++) { - expectedDescs[i] = expected[i].description; - } - - expectedDesc = expected.length > 1 ? - expectedDescs.slice(0, -1).join(", ") + - " or " + - expectedDescs[expected.length - 1] : - expectedDescs[0]; - - foundDesc = found ? "\"" + stringEscape(found) + "\"" : "end of input"; - - return "Expected " + expectedDesc + " but " + foundDesc + " found."; - } - - if (expected !== null) { - cleanupExpected(expected); - } - - return new peg$SyntaxError( - message !== null ? message : buildMessage(expected, found), - expected, - found, - location - ); - } - - function peg$parsestart() { - var s0, s1, s2; - - var key = peg$currPos * 121 + 0, - cached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - s1 = peg$parse_(); - if (s1 !== peg$FAILED) { - s2 = peg$parsetex_expr(); - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c0(s2); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parse_() { - var s0, s1; - - var key = peg$currPos * 121 + 1, - cached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = []; - if (peg$c1.test(input.charAt(peg$currPos))) { - s1 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c2); } - } - while (s1 !== peg$FAILED) { - s0.push(s1); - if (peg$c1.test(input.charAt(peg$currPos))) { - s1 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c2); } - } - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parsespace() { - var s0, s1, s2, s3, s4, s5, s6, s7, s8; - - var key = peg$currPos * 121 + 2, - cached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - if (input.substr(peg$currPos, 2) === peg$c3) { - s0 = peg$c3; - peg$currPos += 2; - } else { - s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c4); } - } - if (s0 === peg$FAILED) { - if (input.substr(peg$currPos, 2) === peg$c5) { - s0 = peg$c5; - peg$currPos += 2; - } else { - s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c6); } - } - if (s0 === peg$FAILED) { - if (input.substr(peg$currPos, 2) === peg$c7) { - s0 = peg$c7; - peg$currPos += 2; - } else { - s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c8); } - } - if (s0 === peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 33) { - s0 = peg$c9; - peg$currPos++; - } else { - s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c10); } - } - if (s0 === peg$FAILED) { - if (input.substr(peg$currPos, 2) === peg$c11) { - s0 = peg$c11; - peg$currPos += 2; - } else { - s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c12); } - } - if (s0 === peg$FAILED) { - if (input.substr(peg$currPos, 2) === peg$c13) { - s0 = peg$c13; - peg$currPos += 2; - } else { - s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c14); } - } - if (s0 === peg$FAILED) { - if (input.substr(peg$currPos, 8) === peg$c15) { - s0 = peg$c15; - peg$currPos += 8; - } else { - s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c16); } - } - if (s0 === peg$FAILED) { - if (input.substr(peg$currPos, 5) === peg$c17) { - s0 = peg$c17; - peg$currPos += 5; - } else { - s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c18); } - } - if (s0 === peg$FAILED) { - if (input.substr(peg$currPos, 6) === peg$c19) { - s0 = peg$c19; - peg$currPos += 6; - } else { - s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c20); } - } - if (s0 === peg$FAILED) { - if (input.substr(peg$currPos, 10) === peg$c21) { - s0 = peg$c21; - peg$currPos += 10; - } else { - s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c22); } - } - if (s0 === peg$FAILED) { - if (input.substr(peg$currPos, 11) === peg$c23) { - s0 = peg$c23; - peg$currPos += 11; - } else { - s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c24); } - } - if (s0 === peg$FAILED) { - if (input.substr(peg$currPos, 10) === peg$c25) { - s0 = peg$c25; - peg$currPos += 10; - } else { - s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c26); } - } - if (s0 === peg$FAILED) { - if (input.substr(peg$currPos, 12) === peg$c27) { - s0 = peg$c27; - peg$currPos += 12; - } else { - s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c28); } - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - if (input.substr(peg$currPos, 5) === peg$c29) { - s1 = peg$c29; - peg$currPos += 5; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c30); } - } - if (s1 !== peg$FAILED) { - s2 = peg$parse_(); - if (s2 !== peg$FAILED) { - s3 = peg$parsenum(); - if (s3 !== peg$FAILED) { - s4 = peg$parse_(); - if (s4 !== peg$FAILED) { - s1 = [s1, s2, s3, s4]; - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - if (input.substr(peg$currPos, 6) === peg$c31) { - s1 = peg$c31; - peg$currPos += 6; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c32); } - } - if (s1 !== peg$FAILED) { - s2 = peg$parse_(); - if (s2 !== peg$FAILED) { - s3 = peg$parsenum(); - if (s3 !== peg$FAILED) { - s4 = peg$parse_(); - if (s4 !== peg$FAILED) { - s1 = [s1, s2, s3, s4]; - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - if (input.substr(peg$currPos, 7) === peg$c33) { - s1 = peg$c33; - peg$currPos += 7; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c34); } - } - if (s1 !== peg$FAILED) { - s2 = peg$parse_(); - if (s2 !== peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 123) { - s3 = peg$c35; - peg$currPos++; - } else { - s3 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c36); } - } - if (s3 !== peg$FAILED) { - s4 = peg$parse_(); - if (s4 !== peg$FAILED) { - s5 = peg$parsenum(); - if (s5 !== peg$FAILED) { - s6 = peg$parse_(); - if (s6 !== peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 125) { - s7 = peg$c37; - peg$currPos++; - } else { - s7 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c38); } - } - if (s7 !== peg$FAILED) { - s8 = peg$parse_(); - if (s8 !== peg$FAILED) { - s1 = [s1, s2, s3, s4, s5, s6, s7, s8]; - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 126) { - s0 = peg$c39; - peg$currPos++; - } else { - s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c40); } - } - if (s0 === peg$FAILED) { - if (input.substr(peg$currPos, 2) === peg$c7) { - s0 = peg$c7; - peg$currPos += 2; - } else { - s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c8); } - } - if (s0 === peg$FAILED) { - if (input.substr(peg$currPos, 6) === peg$c41) { - s0 = peg$c41; - peg$currPos += 6; - } else { - s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c42); } - } - if (s0 === peg$FAILED) { - if (input.substr(peg$currPos, 5) === peg$c43) { - s0 = peg$c43; - peg$currPos += 5; - } else { - s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c44); } - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - if (input.substr(peg$currPos, 9) === peg$c45) { - s1 = peg$c45; - peg$currPos += 9; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c46); } - } - if (s1 !== peg$FAILED) { - s2 = peg$parse_(); - if (s2 !== peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 123) { - s3 = peg$c35; - peg$currPos++; - } else { - s3 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c36); } - } - if (s3 !== peg$FAILED) { - s4 = peg$parse_(); - if (s4 !== peg$FAILED) { - s5 = peg$parselit(); - if (s5 !== peg$FAILED) { - s6 = peg$parse_(); - if (s6 !== peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 125) { - s7 = peg$c37; - peg$currPos++; - } else { - s7 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c38); } - } - if (s7 !== peg$FAILED) { - s8 = peg$parse_(); - if (s8 !== peg$FAILED) { - s1 = [s1, s2, s3, s4, s5, s6, s7, s8]; - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - if (peg$c1.test(input.charAt(peg$currPos))) { - s0 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c2); } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parsetex_expr() { - var s0, s1, s2, s3, s4; - - var key = peg$currPos * 121 + 3, - cached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - s1 = peg$parseexpr(); - if (s1 !== peg$FAILED) { - s2 = peg$parseEOF(); - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c47(s1); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parsene_expr(); - if (s1 !== peg$FAILED) { - s2 = peg$parseFUN_INFIX(); - if (s2 !== peg$FAILED) { - s3 = peg$parsene_expr(); - if (s3 !== peg$FAILED) { - s4 = peg$parseEOF(); - if (s4 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c48(s1, s2, s3); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parsene_expr(); - if (s1 !== peg$FAILED) { - s2 = peg$parseimpossible(); - if (s2 !== peg$FAILED) { - s3 = peg$parsene_expr(); - if (s3 !== peg$FAILED) { - s4 = peg$parseEOF(); - if (s4 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c49(s1, s2, s3); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parseexpr() { - var s0, s1; - - var key = peg$currPos * 121 + 4, - cached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$parsene_expr(); - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$c50; - if (s1 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c51(); - } - s0 = s1; - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parsene_expr() { - var s0, s1, s2; - - var key = peg$currPos * 121 + 5, - cached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - s1 = peg$parselit_aq(); - if (s1 !== peg$FAILED) { - s2 = peg$parseexpr(); - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c52(s1, s2); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parselitsq_aq(); - if (s1 !== peg$FAILED) { - s2 = peg$parseexpr(); - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c52(s1, s2); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parseDECLh(); - if (s1 !== peg$FAILED) { - s2 = peg$parseexpr(); - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c53(s1, s2); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parselitsq_aq() { - var s0; - - var key = peg$currPos * 121 + 6, - cached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$parselitsq_fq(); - if (s0 === peg$FAILED) { - s0 = peg$parselitsq_dq(); - if (s0 === peg$FAILED) { - s0 = peg$parselitsq_uq(); - if (s0 === peg$FAILED) { - s0 = peg$parselitsq_zq(); - } - } - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parselitsq_fq() { - var s0, s1, s2, s3; - - var key = peg$currPos * 121 + 7, - cached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - s1 = peg$parselitsq_dq(); - if (s1 !== peg$FAILED) { - s2 = peg$parseSUP(); - if (s2 !== peg$FAILED) { - s3 = peg$parselit(); - if (s3 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c54(s1, s3); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parselitsq_uq(); - if (s1 !== peg$FAILED) { - s2 = peg$parseSUB(); - if (s2 !== peg$FAILED) { - s3 = peg$parselit(); - if (s3 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c55(s1, s3); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parselitsq_uq() { - var s0, s1, s2, s3; - - var key = peg$currPos * 121 + 8, - cached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - s1 = peg$parselitsq_zq(); - if (s1 !== peg$FAILED) { - s2 = peg$parseSUP(); - if (s2 !== peg$FAILED) { - s3 = peg$parselit(); - if (s3 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c56(s1, s3); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parselitsq_dq() { - var s0, s1, s2, s3; - - var key = peg$currPos * 121 + 9, - cached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - s1 = peg$parselitsq_zq(); - if (s1 !== peg$FAILED) { - s2 = peg$parseSUB(); - if (s2 !== peg$FAILED) { - s3 = peg$parselit(); - if (s3 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c57(s1, s3); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parselitsq_zq() { - var s0, s1; - - var key = peg$currPos * 121 + 10, - cached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - s1 = peg$parseSQ_CLOSE(); - if (s1 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c58(); - } - s0 = s1; - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parseexpr_nosqc() { - var s0, s1, s2; - - var key = peg$currPos * 121 + 11, - cached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - s1 = peg$parselit_aq(); - if (s1 !== peg$FAILED) { - s2 = peg$parseexpr_nosqc(); - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c59(s1, s2); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$c50; - if (s1 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c51(); - } - s0 = s1; - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parselit_aq() { - var s0; - - var key = peg$currPos * 121 + 12, - cached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$parselit_fq(); - if (s0 === peg$FAILED) { - s0 = peg$parselit_dq(); - if (s0 === peg$FAILED) { - s0 = peg$parselit_uq(); - if (s0 === peg$FAILED) { - s0 = peg$parselit_dqn(); - if (s0 === peg$FAILED) { - s0 = peg$parselit_uqn(); - if (s0 === peg$FAILED) { - s0 = peg$parselit(); - } - } - } - } - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parselit_fq() { - var s0, s1, s2, s3; - - var key = peg$currPos * 121 + 13, - cached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - s1 = peg$parselit_dq(); - if (s1 !== peg$FAILED) { - s2 = peg$parseSUP(); - if (s2 !== peg$FAILED) { - s3 = peg$parselit(); - if (s3 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c54(s1, s3); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parselit_uq(); - if (s1 !== peg$FAILED) { - s2 = peg$parseSUB(); - if (s2 !== peg$FAILED) { - s3 = peg$parselit(); - if (s3 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c55(s1, s3); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parselit_dqn(); - if (s1 !== peg$FAILED) { - s2 = peg$parseSUP(); - if (s2 !== peg$FAILED) { - s3 = peg$parselit(); - if (s3 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c60(s1, s3); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parselit_uq() { - var s0, s1, s2, s3; - - var key = peg$currPos * 121 + 14, - cached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - s1 = peg$parselit(); - if (s1 !== peg$FAILED) { - s2 = peg$parseSUP(); - if (s2 !== peg$FAILED) { - s3 = peg$parselit(); - if (s3 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c56(s1, s3); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parselit_dq() { - var s0, s1, s2, s3; - - var key = peg$currPos * 121 + 15, - cached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - s1 = peg$parselit(); - if (s1 !== peg$FAILED) { - s2 = peg$parseSUB(); - if (s2 !== peg$FAILED) { - s3 = peg$parselit(); - if (s3 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c57(s1, s3); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parselit_uqn() { - var s0, s1, s2; - - var key = peg$currPos * 121 + 16, - cached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - s1 = peg$parseSUP(); - if (s1 !== peg$FAILED) { - s2 = peg$parselit(); - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c61(s2); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parselit_dqn() { - var s0, s1, s2; - - var key = peg$currPos * 121 + 17, - cached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - s1 = peg$parseSUB(); - if (s1 !== peg$FAILED) { - s2 = peg$parselit(); - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c62(s2); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parseleft() { - var s0, s1, s2; - - var key = peg$currPos * 121 + 18, - cached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - s1 = peg$parseLEFT(); - if (s1 !== peg$FAILED) { - s2 = peg$parseDELIMITER(); - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c63(s2); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parseLEFT(); - if (s1 !== peg$FAILED) { - s2 = peg$parseSQ_CLOSE(); - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c64(); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parseright() { - var s0, s1, s2; - - var key = peg$currPos * 121 + 19, - cached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - s1 = peg$parseRIGHT(); - if (s1 !== peg$FAILED) { - s2 = peg$parseDELIMITER(); - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c63(s2); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parseRIGHT(); - if (s1 !== peg$FAILED) { - s2 = peg$parseSQ_CLOSE(); - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c64(); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parselit() { - var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, s14, s15, s16, s17, s18; - - var key = peg$currPos * 121 + 20, - cached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - s1 = peg$parsePAREN(); - if (s1 !== peg$FAILED) { - s2 = peg$parseatsymbol(); - if (s2 !== peg$FAILED) { - s3 = peg$parseatsymbol(); - if (s3 !== peg$FAILED) { - s4 = peg$parselit(); - if (s4 !== peg$FAILED) { - peg$savedPos = peg$currPos; - s5 = peg$c65(s1, s4); - if (s5) { - s5 = void 0; - } else { - s5 = peg$FAILED; - } - if (s5 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c66(s1, s4); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parsePAREN(); - if (s1 !== peg$FAILED) { - s2 = peg$parseatsymbol(); - if (s2 !== peg$FAILED) { - s3 = peg$parselit(); - if (s3 !== peg$FAILED) { - peg$savedPos = peg$currPos; - s4 = peg$c65(s1, s3); - if (s4) { - s4 = void 0; - } else { - s4 = peg$FAILED; - } - if (s4 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c67(s1, s3); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - if (input.substr(peg$currPos, 2) === peg$c68) { - s1 = peg$c68; - peg$currPos += 2; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c69); } - } - if (s1 !== peg$FAILED) { - s2 = peg$parselit(); - if (s2 !== peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 94) { - s3 = peg$c70; - peg$currPos++; - } else { - s3 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c71); } - } - if (s3 !== peg$FAILED) { - s4 = []; - if (input.charCodeAt(peg$currPos) === 123) { - s5 = peg$c35; - peg$currPos++; - } else { - s5 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c36); } - } - while (s5 !== peg$FAILED) { - s4.push(s5); - if (input.charCodeAt(peg$currPos) === 123) { - s5 = peg$c35; - peg$currPos++; - } else { - s5 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c36); } - } - } - if (s4 !== peg$FAILED) { - s5 = peg$parse_(); - if (s5 !== peg$FAILED) { - s6 = peg$parsePAREN_OPEN(); - if (s6 !== peg$FAILED) { - s7 = peg$parse_(); - if (s7 !== peg$FAILED) { - s8 = peg$parselit(); - if (s8 !== peg$FAILED) { - s9 = peg$parse_(); - if (s9 !== peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 44) { - s10 = peg$c72; - peg$currPos++; - } else { - s10 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c73); } - } - if (s10 !== peg$FAILED) { - s11 = peg$parse_(); - if (s11 !== peg$FAILED) { - s12 = peg$parselit(); - if (s12 !== peg$FAILED) { - s13 = peg$parse_(); - if (s13 !== peg$FAILED) { - s14 = peg$parsePAREN_CLOSE(); - if (s14 !== peg$FAILED) { - s15 = peg$parse_(); - if (s15 !== peg$FAILED) { - s16 = []; - if (input.charCodeAt(peg$currPos) === 125) { - s17 = peg$c37; - peg$currPos++; - } else { - s17 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c38); } - } - while (s17 !== peg$FAILED) { - s16.push(s17); - if (input.charCodeAt(peg$currPos) === 125) { - s17 = peg$c37; - peg$currPos++; - } else { - s17 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c38); } - } - } - if (s16 !== peg$FAILED) { - s17 = peg$parselitparen1(); - if (s17 !== peg$FAILED) { - peg$savedPos = peg$currPos; - s18 = peg$c74(s2, s8, s12, s17); - if (s18) { - s18 = void 0; - } else { - s18 = peg$FAILED; - } - if (s18 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c75(s2, s8, s12, s17); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - if (input.substr(peg$currPos, 2) === peg$c76) { - s1 = peg$c76; - peg$currPos += 2; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c77); } - } - if (s1 !== peg$FAILED) { - s2 = peg$parselit(); - if (s2 !== peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 94) { - s3 = peg$c70; - peg$currPos++; - } else { - s3 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c71); } - } - if (s3 !== peg$FAILED) { - s4 = peg$parselitparen1(); - if (s4 !== peg$FAILED) { - s5 = peg$parselitparen1(); - if (s5 !== peg$FAILED) { - peg$savedPos = peg$currPos; - s6 = peg$c78(s2, s4, s5); - if (s6) { - s6 = void 0; - } else { - s6 = peg$FAILED; - } - if (s6 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c79(s2, s4, s5); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - if (input.substr(peg$currPos, 2) === peg$c76) { - s1 = peg$c76; - peg$currPos += 2; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c77); } - } - if (s1 !== peg$FAILED) { - s2 = peg$parselit(); - if (s2 !== peg$FAILED) { - s3 = peg$parselitparen1(); - if (s3 !== peg$FAILED) { - peg$savedPos = peg$currPos; - s4 = peg$c80(s2, s3); - if (s4) { - s4 = void 0; - } else { - s4 = peg$FAILED; - } - if (s4 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c81(s2, s3); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parsePAREN_OPEN(); - if (s1 !== peg$FAILED) { - s2 = peg$parselit(); - if (s2 !== peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 59) { - s3 = peg$c82; - peg$currPos++; - } else { - s3 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c83); } - } - if (s3 !== peg$FAILED) { - s4 = peg$parselit(); - if (s4 !== peg$FAILED) { - s5 = peg$parsePAREN_CLOSE(); - if (s5 !== peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 95) { - s6 = peg$c84; - peg$currPos++; - } else { - s6 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c85); } - } - if (s6 !== peg$FAILED) { - s7 = peg$parselit(); - if (s7 !== peg$FAILED) { - peg$savedPos = peg$currPos; - s8 = peg$c78(s2, s4, s7); - if (s8) { - s8 = void 0; - } else { - s8 = peg$FAILED; - } - if (s8 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c86(s2, s4, s7); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parselitparen1(); - if (s1 !== peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 95) { - s2 = peg$c84; - peg$currPos++; - } else { - s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c85); } - } - if (s2 !== peg$FAILED) { - s3 = peg$parselit(); - if (s3 !== peg$FAILED) { - peg$savedPos = peg$currPos; - s4 = peg$c87(s1, s3); - if (s4) { - s4 = void 0; - } else { - s4 = peg$FAILED; - } - if (s4 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c88(s1, s3); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parsePAREN(); - if (s1 !== peg$FAILED) { - s2 = peg$parselitparen1(); - if (s2 !== peg$FAILED) { - peg$savedPos = peg$currPos; - s3 = peg$c65(s1, s2); - if (s3) { - s3 = void 0; - } else { - s3 = peg$FAILED; - } - if (s3 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c67(s1, s2); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parsePAREN(); - if (s1 !== peg$FAILED) { - s2 = peg$parselit(); - if (s2 !== peg$FAILED) { - peg$savedPos = peg$currPos; - s3 = peg$c89(s1, s2); - if (s3) { - s3 = void 0; - } else { - s3 = peg$FAILED; - } - if (s3 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c90(s1, s2); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 123) { - s1 = peg$c35; - peg$currPos++; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c36); } - } - if (s1 !== peg$FAILED) { - s2 = peg$parse_(); - if (s2 !== peg$FAILED) { - if (input.substr(peg$currPos, 3) === peg$c91) { - s3 = peg$c91; - peg$currPos += 3; - } else { - s3 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c92); } - } - if (s3 !== peg$FAILED) { - s4 = peg$parse_(); - if (s4 !== peg$FAILED) { - s5 = peg$parseEJACOBI(); - if (s5 !== peg$FAILED) { - s6 = peg$parse_(); - if (s6 !== peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 125) { - s7 = peg$c37; - peg$currPos++; - } else { - s7 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c38); } - } - if (s7 !== peg$FAILED) { - s8 = peg$parse_(); - if (s8 !== peg$FAILED) { - s9 = peg$parsePAREN_OPEN(); - if (s9 !== peg$FAILED) { - s10 = peg$parse_(); - if (s10 !== peg$FAILED) { - s11 = peg$parselit(); - if (s11 !== peg$FAILED) { - s12 = peg$parse_(); - if (s12 !== peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 44) { - s13 = peg$c72; - peg$currPos++; - } else { - s13 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c73); } - } - if (s13 !== peg$FAILED) { - s14 = peg$parse_(); - if (s14 !== peg$FAILED) { - s15 = peg$parselit(); - if (s15 !== peg$FAILED) { - s16 = peg$parse_(); - if (s16 !== peg$FAILED) { - s17 = peg$parsePAREN_CLOSE(); - if (s17 !== peg$FAILED) { - peg$savedPos = peg$currPos; - s18 = peg$c93(s5, s11, s15); - if (s18) { - s18 = void 0; - } else { - s18 = peg$FAILED; - } - if (s18 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c94(s5, s11, s15); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parseLITERAL(); - if (s1 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c95(s1); - } - s0 = s1; - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parsegeneric_func(); - if (s1 !== peg$FAILED) { - peg$savedPos = peg$currPos; - s2 = peg$c96(s1); - if (s2) { - s2 = void 0; - } else { - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - s3 = peg$parse_(); - if (s3 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c97(s1); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parseDELIMITER(); - if (s1 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c95(s1); - } - s0 = s1; - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parseBIG(); - if (s1 !== peg$FAILED) { - s2 = peg$parseDELIMITER(); - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c98(s1, s2); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parseBIG(); - if (s1 !== peg$FAILED) { - s2 = peg$parseSQ_CLOSE(); - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c99(s1); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parseleft(); - if (s1 !== peg$FAILED) { - s2 = peg$parseexpr(); - if (s2 !== peg$FAILED) { - s3 = peg$parseright(); - if (s3 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c100(s1, s2, s3); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parseFUN_AR1opt(); - if (s1 !== peg$FAILED) { - s2 = peg$parseexpr_nosqc(); - if (s2 !== peg$FAILED) { - s3 = peg$parseSQ_CLOSE(); - if (s3 !== peg$FAILED) { - s4 = peg$parselit(); - if (s4 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c101(s1, s2, s4); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parseFUN_AR1(); - if (s1 !== peg$FAILED) { - s2 = peg$parselit(); - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c102(s1, s2); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parseFUN_AR1nb(); - if (s1 !== peg$FAILED) { - s2 = peg$parselit(); - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c103(s1, s2); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parseFUN_AR2(); - if (s1 !== peg$FAILED) { - s2 = peg$parselit(); - if (s2 !== peg$FAILED) { - s3 = peg$parselit(); - if (s3 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c104(s1, s2, s3); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parseFUN_AR2nb(); - if (s1 !== peg$FAILED) { - s2 = peg$parselit(); - if (s2 !== peg$FAILED) { - s3 = peg$parselit(); - if (s3 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c105(s1, s2, s3); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parseFUN_AR3(); - if (s1 !== peg$FAILED) { - s2 = peg$parselit(); - if (s2 !== peg$FAILED) { - s3 = peg$parselit(); - if (s3 !== peg$FAILED) { - s4 = peg$parselit(); - if (s4 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c106(s1, s2, s3, s4); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parseJACOBI(); - if (s1 !== peg$FAILED) { - s2 = peg$parselit(); - if (s2 !== peg$FAILED) { - s3 = peg$parselit(); - if (s3 !== peg$FAILED) { - s4 = peg$parselit(); - if (s4 !== peg$FAILED) { - s5 = peg$parseatsymbol(); - if (s5 !== peg$FAILED) { - s6 = peg$parselit(); - if (s6 !== peg$FAILED) { - peg$savedPos = peg$currPos; - s7 = peg$c107(s1, s2, s3, s4, s6); - if (s7) { - s7 = void 0; - } else { - s7 = peg$FAILED; - } - if (s7 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c108(s1, s2, s3, s4, s6); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parseLAGUERRE(); - if (s1 !== peg$FAILED) { - s2 = peg$parselit(); - if (s2 !== peg$FAILED) { - s3 = peg$parseatsymbol(); - if (s3 !== peg$FAILED) { - s4 = peg$parselit(); - if (s4 !== peg$FAILED) { - peg$savedPos = peg$currPos; - s5 = peg$c109(s1, s2, s4); - if (s5) { - s5 = void 0; - } else { - s5 = peg$FAILED; - } - if (s5 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c110(s1, s2, s4); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parseLAGUERRE(); - if (s1 !== peg$FAILED) { - s2 = peg$parselit(); - if (s2 !== peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 91) { - s3 = peg$c111; - peg$currPos++; - } else { - s3 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c112); } - } - if (s3 !== peg$FAILED) { - s4 = peg$parselit(); - if (s4 !== peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 93) { - s5 = peg$c113; - peg$currPos++; - } else { - s5 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c114); } - } - if (s5 !== peg$FAILED) { - s6 = peg$parseatsymbol(); - if (s6 !== peg$FAILED) { - s7 = peg$parselit(); - if (s7 !== peg$FAILED) { - peg$savedPos = peg$currPos; - s8 = peg$c115(s1, s2, s4, s7); - if (s8) { - s8 = void 0; - } else { - s8 = peg$FAILED; - } - if (s8 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c116(s1, s2, s4, s7); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - if (input.substr(peg$currPos, 7) === peg$c117) { - s1 = peg$c117; - peg$currPos += 7; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c118); } - } - if (s1 !== peg$FAILED) { - s2 = peg$parseEJACOBI(); - if (s2 !== peg$FAILED) { - s3 = peg$parseatsymbol(); - if (s3 !== peg$FAILED) { - s4 = peg$parselit(); - if (s4 !== peg$FAILED) { - s5 = peg$parselit(); - if (s5 !== peg$FAILED) { - peg$savedPos = peg$currPos; - s6 = peg$c93(s2, s4, s5); - if (s6) { - s6 = void 0; - } else { - s6 = peg$FAILED; - } - if (s6 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c94(s2, s4, s5); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$parseBOX(); - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parseCURLY_OPEN(); - if (s1 !== peg$FAILED) { - s2 = peg$parseexpr(); - if (s2 !== peg$FAILED) { - s3 = peg$parseCURLY_CLOSE(); - if (s3 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c119(s2); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parseCURLY_OPEN(); - if (s1 !== peg$FAILED) { - s2 = peg$parsene_expr(); - if (s2 !== peg$FAILED) { - s3 = peg$parseFUN_INFIX(); - if (s3 !== peg$FAILED) { - s4 = peg$parsene_expr(); - if (s4 !== peg$FAILED) { - s5 = peg$parseCURLY_CLOSE(); - if (s5 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c120(s2, s3, s4); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parseCURLY_OPEN(); - if (s1 !== peg$FAILED) { - s2 = peg$parsene_expr(); - if (s2 !== peg$FAILED) { - s3 = peg$parseimpossible(); - if (s3 !== peg$FAILED) { - s4 = peg$parsene_expr(); - if (s4 !== peg$FAILED) { - s5 = peg$parseCURLY_CLOSE(); - if (s5 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c121(s2, s3, s4); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parseBEGIN_MATRIX(); - if (s1 !== peg$FAILED) { - s2 = peg$parsearray(); - if (s2 === peg$FAILED) { - s2 = peg$parsematrix(); - } - if (s2 !== peg$FAILED) { - s3 = peg$parseEND_MATRIX(); - if (s3 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c122(s2); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parseBEGIN_PMATRIX(); - if (s1 !== peg$FAILED) { - s2 = peg$parsearray(); - if (s2 === peg$FAILED) { - s2 = peg$parsematrix(); - } - if (s2 !== peg$FAILED) { - s3 = peg$parseEND_PMATRIX(); - if (s3 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c123(s2); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parseBEGIN_BMATRIX(); - if (s1 !== peg$FAILED) { - s2 = peg$parsearray(); - if (s2 === peg$FAILED) { - s2 = peg$parsematrix(); - } - if (s2 !== peg$FAILED) { - s3 = peg$parseEND_BMATRIX(); - if (s3 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c124(s2); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parseBEGIN_BBMATRIX(); - if (s1 !== peg$FAILED) { - s2 = peg$parsearray(); - if (s2 === peg$FAILED) { - s2 = peg$parsematrix(); - } - if (s2 !== peg$FAILED) { - s3 = peg$parseEND_BBMATRIX(); - if (s3 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c125(s2); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parseBEGIN_VMATRIX(); - if (s1 !== peg$FAILED) { - s2 = peg$parsearray(); - if (s2 === peg$FAILED) { - s2 = peg$parsematrix(); - } - if (s2 !== peg$FAILED) { - s3 = peg$parseEND_VMATRIX(); - if (s3 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c126(s2); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parseBEGIN_VVMATRIX(); - if (s1 !== peg$FAILED) { - s2 = peg$parsearray(); - if (s2 === peg$FAILED) { - s2 = peg$parsematrix(); - } - if (s2 !== peg$FAILED) { - s3 = peg$parseEND_VVMATRIX(); - if (s3 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c127(s2); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parseBEGIN_ARRAY(); - if (s1 !== peg$FAILED) { - s2 = peg$parseopt_pos(); - if (s2 !== peg$FAILED) { - s3 = peg$parsearray(); - if (s3 !== peg$FAILED) { - s4 = peg$parseEND_ARRAY(); - if (s4 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c128(s3); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parseBEGIN_ALIGN(); - if (s1 !== peg$FAILED) { - s2 = peg$parseopt_pos(); - if (s2 !== peg$FAILED) { - s3 = peg$parsematrix(); - if (s3 !== peg$FAILED) { - s4 = peg$parseEND_ALIGN(); - if (s4 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c129(s3); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parseBEGIN_ALIGNED(); - if (s1 !== peg$FAILED) { - s2 = peg$parseopt_pos(); - if (s2 !== peg$FAILED) { - s3 = peg$parsematrix(); - if (s3 !== peg$FAILED) { - s4 = peg$parseEND_ALIGNED(); - if (s4 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c129(s3); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parseBEGIN_ALIGNAT(); - if (s1 !== peg$FAILED) { - s2 = peg$parsealignat(); - if (s2 !== peg$FAILED) { - s3 = peg$parseEND_ALIGNAT(); - if (s3 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c130(s2); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parseBEGIN_ALIGNEDAT(); - if (s1 !== peg$FAILED) { - s2 = peg$parsealignat(); - if (s2 !== peg$FAILED) { - s3 = peg$parseEND_ALIGNEDAT(); - if (s3 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c130(s2); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parseBEGIN_SMALLMATRIX(); - if (s1 !== peg$FAILED) { - s2 = peg$parsearray(); - if (s2 === peg$FAILED) { - s2 = peg$parsematrix(); - } - if (s2 !== peg$FAILED) { - s3 = peg$parseEND_SMALLMATRIX(); - if (s3 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c131(s2); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parseBEGIN_CASES(); - if (s1 !== peg$FAILED) { - s2 = peg$parsematrix(); - if (s2 !== peg$FAILED) { - s3 = peg$parseEND_CASES(); - if (s3 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c132(s2); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parseBEGIN_MULTLINE(); - if (s1 !== peg$FAILED) { - s2 = peg$parsemultline(); - if (s2 !== peg$FAILED) { - s3 = peg$parseEND_MULTLINE(); - if (s3 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c133(s2); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parseBEGIN_MULTLINE_STAR(); - if (s1 !== peg$FAILED) { - s2 = peg$parsemultline(); - if (s2 !== peg$FAILED) { - s3 = peg$parseEND_MULTLINE_STAR(); - if (s3 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c134(s2); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - if (input.substr(peg$currPos, 7) === peg$c135) { - s1 = peg$c135; - peg$currPos += 7; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c136); } - } - if (s1 !== peg$FAILED) { - s2 = []; - s3 = peg$parsealpha(); - if (s3 !== peg$FAILED) { - while (s3 !== peg$FAILED) { - s2.push(s3); - s3 = peg$parsealpha(); - } - } else { - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 125) { - s3 = peg$c37; - peg$currPos++; - } else { - s3 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c38); } - } - if (s3 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c137(); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parsegeneric_func(); - if (s1 !== peg$FAILED) { - peg$savedPos = peg$currPos; - s2 = peg$c138(s1); - if (s2) { - s2 = void 0; - } else { - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c139(s1); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parselitstuff() { - var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, s14, s15, s16, s17, s18; - - var key = peg$currPos * 121 + 21, - cached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - s1 = peg$parsePAREN(); - if (s1 !== peg$FAILED) { - s2 = peg$parseatsymbol(); - if (s2 !== peg$FAILED) { - s3 = peg$parseatsymbol(); - if (s3 !== peg$FAILED) { - s4 = peg$parselit(); - if (s4 !== peg$FAILED) { - peg$savedPos = peg$currPos; - s5 = peg$c65(s1, s4); - if (s5) { - s5 = void 0; - } else { - s5 = peg$FAILED; - } - if (s5 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c66(s1, s4); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parsePAREN(); - if (s1 !== peg$FAILED) { - s2 = peg$parseatsymbol(); - if (s2 !== peg$FAILED) { - s3 = peg$parselit(); - if (s3 !== peg$FAILED) { - peg$savedPos = peg$currPos; - s4 = peg$c65(s1, s3); - if (s4) { - s4 = void 0; - } else { - s4 = peg$FAILED; - } - if (s4 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c67(s1, s3); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - if (input.substr(peg$currPos, 2) === peg$c68) { - s1 = peg$c68; - peg$currPos += 2; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c69); } - } - if (s1 !== peg$FAILED) { - s2 = peg$parselit(); - if (s2 !== peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 94) { - s3 = peg$c70; - peg$currPos++; - } else { - s3 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c71); } - } - if (s3 !== peg$FAILED) { - s4 = []; - if (input.charCodeAt(peg$currPos) === 123) { - s5 = peg$c35; - peg$currPos++; - } else { - s5 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c36); } - } - while (s5 !== peg$FAILED) { - s4.push(s5); - if (input.charCodeAt(peg$currPos) === 123) { - s5 = peg$c35; - peg$currPos++; - } else { - s5 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c36); } - } - } - if (s4 !== peg$FAILED) { - s5 = peg$parse_(); - if (s5 !== peg$FAILED) { - s6 = peg$parsePAREN_OPEN(); - if (s6 !== peg$FAILED) { - s7 = peg$parse_(); - if (s7 !== peg$FAILED) { - s8 = peg$parselit(); - if (s8 !== peg$FAILED) { - s9 = peg$parse_(); - if (s9 !== peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 44) { - s10 = peg$c72; - peg$currPos++; - } else { - s10 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c73); } - } - if (s10 !== peg$FAILED) { - s11 = peg$parse_(); - if (s11 !== peg$FAILED) { - s12 = peg$parselit(); - if (s12 !== peg$FAILED) { - s13 = peg$parse_(); - if (s13 !== peg$FAILED) { - s14 = peg$parsePAREN_CLOSE(); - if (s14 !== peg$FAILED) { - s15 = peg$parse_(); - if (s15 !== peg$FAILED) { - s16 = []; - if (input.charCodeAt(peg$currPos) === 125) { - s17 = peg$c37; - peg$currPos++; - } else { - s17 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c38); } - } - while (s17 !== peg$FAILED) { - s16.push(s17); - if (input.charCodeAt(peg$currPos) === 125) { - s17 = peg$c37; - peg$currPos++; - } else { - s17 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c38); } - } - } - if (s16 !== peg$FAILED) { - s17 = peg$parselitparen1(); - if (s17 !== peg$FAILED) { - peg$savedPos = peg$currPos; - s18 = peg$c74(s2, s8, s12, s17); - if (s18) { - s18 = void 0; - } else { - s18 = peg$FAILED; - } - if (s18 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c75(s2, s8, s12, s17); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - if (input.substr(peg$currPos, 2) === peg$c76) { - s1 = peg$c76; - peg$currPos += 2; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c77); } - } - if (s1 !== peg$FAILED) { - s2 = peg$parselit(); - if (s2 !== peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 94) { - s3 = peg$c70; - peg$currPos++; - } else { - s3 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c71); } - } - if (s3 !== peg$FAILED) { - s4 = peg$parselitparen1(); - if (s4 !== peg$FAILED) { - s5 = peg$parselitparen1(); - if (s5 !== peg$FAILED) { - peg$savedPos = peg$currPos; - s6 = peg$c78(s2, s4, s5); - if (s6) { - s6 = void 0; - } else { - s6 = peg$FAILED; - } - if (s6 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c79(s2, s4, s5); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - if (input.substr(peg$currPos, 2) === peg$c76) { - s1 = peg$c76; - peg$currPos += 2; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c77); } - } - if (s1 !== peg$FAILED) { - s2 = peg$parselit(); - if (s2 !== peg$FAILED) { - s3 = peg$parselitparen1(); - if (s3 !== peg$FAILED) { - peg$savedPos = peg$currPos; - s4 = peg$c80(s2, s3); - if (s4) { - s4 = void 0; - } else { - s4 = peg$FAILED; - } - if (s4 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c81(s2, s3); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parsePAREN_OPEN(); - if (s1 !== peg$FAILED) { - s2 = peg$parselit(); - if (s2 !== peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 59) { - s3 = peg$c82; - peg$currPos++; - } else { - s3 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c83); } - } - if (s3 !== peg$FAILED) { - s4 = peg$parselit(); - if (s4 !== peg$FAILED) { - s5 = peg$parsePAREN_CLOSE(); - if (s5 !== peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 95) { - s6 = peg$c84; - peg$currPos++; - } else { - s6 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c85); } - } - if (s6 !== peg$FAILED) { - s7 = peg$parselit(); - if (s7 !== peg$FAILED) { - peg$savedPos = peg$currPos; - s8 = peg$c78(s2, s4, s7); - if (s8) { - s8 = void 0; - } else { - s8 = peg$FAILED; - } - if (s8 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c86(s2, s4, s7); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parselitparen1(); - if (s1 !== peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 95) { - s2 = peg$c84; - peg$currPos++; - } else { - s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c85); } - } - if (s2 !== peg$FAILED) { - s3 = peg$parselit(); - if (s3 !== peg$FAILED) { - peg$savedPos = peg$currPos; - s4 = peg$c87(s1, s3); - if (s4) { - s4 = void 0; - } else { - s4 = peg$FAILED; - } - if (s4 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c88(s1, s3); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parsePAREN(); - if (s1 !== peg$FAILED) { - s2 = peg$parselitparen1(); - if (s2 !== peg$FAILED) { - peg$savedPos = peg$currPos; - s3 = peg$c65(s1, s2); - if (s3) { - s3 = void 0; - } else { - s3 = peg$FAILED; - } - if (s3 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c67(s1, s2); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parsePAREN(); - if (s1 !== peg$FAILED) { - s2 = peg$parselit(); - if (s2 !== peg$FAILED) { - peg$savedPos = peg$currPos; - s3 = peg$c89(s1, s2); - if (s3) { - s3 = void 0; - } else { - s3 = peg$FAILED; - } - if (s3 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c90(s1, s2); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 123) { - s1 = peg$c35; - peg$currPos++; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c36); } - } - if (s1 !== peg$FAILED) { - s2 = peg$parse_(); - if (s2 !== peg$FAILED) { - if (input.substr(peg$currPos, 3) === peg$c91) { - s3 = peg$c91; - peg$currPos += 3; - } else { - s3 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c92); } - } - if (s3 !== peg$FAILED) { - s4 = peg$parse_(); - if (s4 !== peg$FAILED) { - s5 = peg$parseEJACOBI(); - if (s5 !== peg$FAILED) { - s6 = peg$parse_(); - if (s6 !== peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 125) { - s7 = peg$c37; - peg$currPos++; - } else { - s7 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c38); } - } - if (s7 !== peg$FAILED) { - s8 = peg$parse_(); - if (s8 !== peg$FAILED) { - s9 = peg$parsePAREN_OPEN(); - if (s9 !== peg$FAILED) { - s10 = peg$parse_(); - if (s10 !== peg$FAILED) { - s11 = peg$parselit(); - if (s11 !== peg$FAILED) { - s12 = peg$parse_(); - if (s12 !== peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 44) { - s13 = peg$c72; - peg$currPos++; - } else { - s13 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c73); } - } - if (s13 !== peg$FAILED) { - s14 = peg$parse_(); - if (s14 !== peg$FAILED) { - s15 = peg$parselit(); - if (s15 !== peg$FAILED) { - s16 = peg$parse_(); - if (s16 !== peg$FAILED) { - s17 = peg$parsePAREN_CLOSE(); - if (s17 !== peg$FAILED) { - peg$savedPos = peg$currPos; - s18 = peg$c93(s5, s11, s15); - if (s18) { - s18 = void 0; - } else { - s18 = peg$FAILED; - } - if (s18 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c94(s5, s11, s15); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parseBIG(); - if (s1 !== peg$FAILED) { - s2 = peg$parseDELIMITER(); - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c98(s1, s2); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parseBIG(); - if (s1 !== peg$FAILED) { - s2 = peg$parseSQ_CLOSE(); - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c99(s1); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parseleft(); - if (s1 !== peg$FAILED) { - s2 = peg$parseexpr(); - if (s2 !== peg$FAILED) { - s3 = peg$parseright(); - if (s3 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c100(s1, s2, s3); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parseFUN_AR1opt(); - if (s1 !== peg$FAILED) { - s2 = peg$parseexpr_nosqc(); - if (s2 !== peg$FAILED) { - s3 = peg$parseSQ_CLOSE(); - if (s3 !== peg$FAILED) { - s4 = peg$parselit(); - if (s4 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c101(s1, s2, s4); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parseFUN_AR1(); - if (s1 !== peg$FAILED) { - s2 = peg$parselit(); - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c102(s1, s2); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parseFUN_AR1nb(); - if (s1 !== peg$FAILED) { - s2 = peg$parselit(); - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c103(s1, s2); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parseimpossible(); - if (s1 !== peg$FAILED) { - s2 = peg$parselit(); - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c140(s1, s2); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parseimpossible(); - if (s1 !== peg$FAILED) { - s2 = peg$parselit(); - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c141(s1, s2); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parseFUN_AR2(); - if (s1 !== peg$FAILED) { - s2 = peg$parselit(); - if (s2 !== peg$FAILED) { - s3 = peg$parselit(); - if (s3 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c104(s1, s2, s3); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parseFUN_AR2nb(); - if (s1 !== peg$FAILED) { - s2 = peg$parselit(); - if (s2 !== peg$FAILED) { - s3 = peg$parselit(); - if (s3 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c105(s1, s2, s3); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parseimpossible(); - if (s1 !== peg$FAILED) { - s2 = peg$parselit(); - if (s2 !== peg$FAILED) { - s3 = peg$parselit(); - if (s3 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c142(s1, s2, s3); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parseFUN_AR3(); - if (s1 !== peg$FAILED) { - s2 = peg$parselit(); - if (s2 !== peg$FAILED) { - s3 = peg$parselit(); - if (s3 !== peg$FAILED) { - s4 = peg$parselit(); - if (s4 !== peg$FAILED) { - peg$savedPos = peg$currPos; - s5 = peg$c143(s1, s2, s3, s4); - if (s5) { - s5 = void 0; - } else { - s5 = peg$FAILED; - } - if (s5 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c106(s1, s2, s3, s4); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parseJACOBI(); - if (s1 !== peg$FAILED) { - s2 = peg$parselit(); - if (s2 !== peg$FAILED) { - s3 = peg$parselit(); - if (s3 !== peg$FAILED) { - s4 = peg$parselit(); - if (s4 !== peg$FAILED) { - s5 = peg$parseatsymbol(); - if (s5 !== peg$FAILED) { - s6 = peg$parselit(); - if (s6 !== peg$FAILED) { - peg$savedPos = peg$currPos; - s7 = peg$c107(s1, s2, s3, s4, s6); - if (s7) { - s7 = void 0; - } else { - s7 = peg$FAILED; - } - if (s7 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c108(s1, s2, s3, s4, s6); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parseLAGUERRE(); - if (s1 !== peg$FAILED) { - s2 = peg$parselit(); - if (s2 !== peg$FAILED) { - s3 = peg$parseatsymbol(); - if (s3 !== peg$FAILED) { - s4 = peg$parselit(); - if (s4 !== peg$FAILED) { - peg$savedPos = peg$currPos; - s5 = peg$c109(s1, s2, s4); - if (s5) { - s5 = void 0; - } else { - s5 = peg$FAILED; - } - if (s5 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c110(s1, s2, s4); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parseLAGUERRE(); - if (s1 !== peg$FAILED) { - s2 = peg$parselit(); - if (s2 !== peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 91) { - s3 = peg$c111; - peg$currPos++; - } else { - s3 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c112); } - } - if (s3 !== peg$FAILED) { - s4 = peg$parselit(); - if (s4 !== peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 93) { - s5 = peg$c113; - peg$currPos++; - } else { - s5 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c114); } - } - if (s5 !== peg$FAILED) { - s6 = peg$parseatsymbol(); - if (s6 !== peg$FAILED) { - s7 = peg$parselit(); - if (s7 !== peg$FAILED) { - peg$savedPos = peg$currPos; - s8 = peg$c115(s1, s2, s4, s7); - if (s8) { - s8 = void 0; - } else { - s8 = peg$FAILED; - } - if (s8 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c116(s1, s2, s4, s7); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - if (input.substr(peg$currPos, 7) === peg$c117) { - s1 = peg$c117; - peg$currPos += 7; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c118); } - } - if (s1 !== peg$FAILED) { - s2 = peg$parseEJACOBI(); - if (s2 !== peg$FAILED) { - s3 = peg$parseatsymbol(); - if (s3 !== peg$FAILED) { - s4 = peg$parselit(); - if (s4 !== peg$FAILED) { - s5 = peg$parselit(); - if (s5 !== peg$FAILED) { - peg$savedPos = peg$currPos; - s6 = peg$c93(s2, s4, s5); - if (s6) { - s6 = void 0; - } else { - s6 = peg$FAILED; - } - if (s6 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c94(s2, s4, s5); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$parseBOX(); - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parseCURLY_OPEN(); - if (s1 !== peg$FAILED) { - s2 = peg$parseexpr(); - if (s2 !== peg$FAILED) { - s3 = peg$parseCURLY_CLOSE(); - if (s3 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c119(s2); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parseCURLY_OPEN(); - if (s1 !== peg$FAILED) { - s2 = peg$parsene_expr(); - if (s2 !== peg$FAILED) { - s3 = peg$parseFUN_INFIX(); - if (s3 !== peg$FAILED) { - s4 = peg$parsene_expr(); - if (s4 !== peg$FAILED) { - s5 = peg$parseCURLY_CLOSE(); - if (s5 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c120(s2, s3, s4); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parseCURLY_OPEN(); - if (s1 !== peg$FAILED) { - s2 = peg$parsene_expr(); - if (s2 !== peg$FAILED) { - s3 = peg$parseimpossible(); - if (s3 !== peg$FAILED) { - s4 = peg$parsene_expr(); - if (s4 !== peg$FAILED) { - s5 = peg$parseCURLY_CLOSE(); - if (s5 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c121(s2, s3, s4); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parseBEGIN_MATRIX(); - if (s1 !== peg$FAILED) { - s2 = peg$parsearray(); - if (s2 === peg$FAILED) { - s2 = peg$parsematrix(); - } - if (s2 !== peg$FAILED) { - s3 = peg$parseEND_MATRIX(); - if (s3 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c122(s2); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parseBEGIN_PMATRIX(); - if (s1 !== peg$FAILED) { - s2 = peg$parsearray(); - if (s2 === peg$FAILED) { - s2 = peg$parsematrix(); - } - if (s2 !== peg$FAILED) { - s3 = peg$parseEND_PMATRIX(); - if (s3 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c123(s2); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parseBEGIN_BMATRIX(); - if (s1 !== peg$FAILED) { - s2 = peg$parsearray(); - if (s2 === peg$FAILED) { - s2 = peg$parsematrix(); - } - if (s2 !== peg$FAILED) { - s3 = peg$parseEND_BMATRIX(); - if (s3 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c124(s2); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parseBEGIN_BBMATRIX(); - if (s1 !== peg$FAILED) { - s2 = peg$parsearray(); - if (s2 === peg$FAILED) { - s2 = peg$parsematrix(); - } - if (s2 !== peg$FAILED) { - s3 = peg$parseEND_BBMATRIX(); - if (s3 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c125(s2); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parseBEGIN_VMATRIX(); - if (s1 !== peg$FAILED) { - s2 = peg$parsearray(); - if (s2 === peg$FAILED) { - s2 = peg$parsematrix(); - } - if (s2 !== peg$FAILED) { - s3 = peg$parseEND_VMATRIX(); - if (s3 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c126(s2); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parseBEGIN_VVMATRIX(); - if (s1 !== peg$FAILED) { - s2 = peg$parsearray(); - if (s2 === peg$FAILED) { - s2 = peg$parsematrix(); - } - if (s2 !== peg$FAILED) { - s3 = peg$parseEND_VVMATRIX(); - if (s3 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c127(s2); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parseBEGIN_ARRAY(); - if (s1 !== peg$FAILED) { - s2 = peg$parseopt_pos(); - if (s2 !== peg$FAILED) { - s3 = peg$parsearray(); - if (s3 !== peg$FAILED) { - s4 = peg$parseEND_ARRAY(); - if (s4 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c128(s3); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parseBEGIN_ALIGN(); - if (s1 !== peg$FAILED) { - s2 = peg$parseopt_pos(); - if (s2 !== peg$FAILED) { - s3 = peg$parsematrix(); - if (s3 !== peg$FAILED) { - s4 = peg$parseEND_ALIGN(); - if (s4 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c129(s3); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parseBEGIN_ALIGNED(); - if (s1 !== peg$FAILED) { - s2 = peg$parseopt_pos(); - if (s2 !== peg$FAILED) { - s3 = peg$parsematrix(); - if (s3 !== peg$FAILED) { - s4 = peg$parseEND_ALIGNED(); - if (s4 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c129(s3); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parseBEGIN_ALIGNAT(); - if (s1 !== peg$FAILED) { - s2 = peg$parsealignat(); - if (s2 !== peg$FAILED) { - s3 = peg$parseEND_ALIGNAT(); - if (s3 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c130(s2); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parseBEGIN_ALIGNEDAT(); - if (s1 !== peg$FAILED) { - s2 = peg$parsealignat(); - if (s2 !== peg$FAILED) { - s3 = peg$parseEND_ALIGNEDAT(); - if (s3 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c130(s2); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parseBEGIN_SMALLMATRIX(); - if (s1 !== peg$FAILED) { - s2 = peg$parsearray(); - if (s2 === peg$FAILED) { - s2 = peg$parsematrix(); - } - if (s2 !== peg$FAILED) { - s3 = peg$parseEND_SMALLMATRIX(); - if (s3 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c131(s2); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parseBEGIN_CASES(); - if (s1 !== peg$FAILED) { - s2 = peg$parsematrix(); - if (s2 !== peg$FAILED) { - s3 = peg$parseEND_CASES(); - if (s3 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c132(s2); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parseBEGIN_MULTLINE(); - if (s1 !== peg$FAILED) { - s2 = peg$parsemultline(); - if (s2 !== peg$FAILED) { - s3 = peg$parseEND_MULTLINE(); - if (s3 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c133(s2); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parseBEGIN_MULTLINE_STAR(); - if (s1 !== peg$FAILED) { - s2 = peg$parsemultline(); - if (s2 !== peg$FAILED) { - s3 = peg$parseEND_MULTLINE_STAR(); - if (s3 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c134(s2); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - if (input.substr(peg$currPos, 7) === peg$c135) { - s1 = peg$c135; - peg$currPos += 7; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c136); } - } - if (s1 !== peg$FAILED) { - s2 = []; - s3 = peg$parsealpha(); - if (s3 !== peg$FAILED) { - while (s3 !== peg$FAILED) { - s2.push(s3); - s3 = peg$parsealpha(); - } - } else { - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 125) { - s3 = peg$c37; - peg$currPos++; - } else { - s3 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c38); } - } - if (s3 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c137(); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parsegeneric_func(); - if (s1 !== peg$FAILED) { - peg$savedPos = peg$currPos; - s2 = peg$c138(s1); - if (s2) { - s2 = void 0; - } else { - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c144(s1); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parseLITERALPART(); - if (s1 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c145(s1); - } - s0 = s1; - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parselitparen1() { - var s0, s1, s2, s3, s4, s5; - - var key = peg$currPos * 121 + 22, - cached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 123) { - s1 = peg$c35; - peg$currPos++; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c36); } - } - if (s1 !== peg$FAILED) { - s2 = peg$parse_(); - if (s2 !== peg$FAILED) { - s3 = peg$parselitparen1(); - if (s3 !== peg$FAILED) { - s4 = peg$parse_(); - if (s4 !== peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 125) { - s5 = peg$c37; - peg$currPos++; - } else { - s5 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c38); } - } - if (s5 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c146(s3); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parselitparen(); - if (s1 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c146(s1); - } - s0 = s1; - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parselitparen() { - var s0, s1, s2, s3, s4, s5; - - var key = peg$currPos * 121 + 23, - cached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - s1 = peg$parsePAREN_OPEN(); - if (s1 !== peg$FAILED) { - s2 = peg$parse_(); - if (s2 !== peg$FAILED) { - s3 = peg$parselitplus(); - if (s3 !== peg$FAILED) { - s4 = peg$parse_(); - if (s4 !== peg$FAILED) { - s5 = peg$parsePAREN_CLOSE(); - if (s5 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c147(s3); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parselitplus() { - var s0, s1, s2; - - var key = peg$currPos * 121 + 24, - cached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - s1 = peg$parselitstuff(); - if (s1 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c146(s1); - } - s0 = s1; - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = []; - s2 = peg$parseLITERAL(); - if (s2 !== peg$FAILED) { - while (s2 !== peg$FAILED) { - s1.push(s2); - s2 = peg$parseLITERAL(); - } - } else { - s1 = peg$FAILED; - } - if (s1 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c148(s1); - } - s0 = s1; - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$c50; - if (s1 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c149(); - } - s0 = s1; - } - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parsearray() { - var s0, s1, s2; - - var key = peg$currPos * 121 + 25, - cached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - s1 = peg$parsecolumn_spec(); - if (s1 !== peg$FAILED) { - s2 = peg$parsematrix(); - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c150(s1, s2); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parsealignat() { - var s0, s1, s2; - - var key = peg$currPos * 121 + 26, - cached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - s1 = peg$parsealignat_spec(); - if (s1 !== peg$FAILED) { - s2 = peg$parsematrix(); - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c151(s1, s2); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parsematrix() { - var s0, s1, s2, s3, s4; - - var key = peg$currPos * 121 + 27, - cached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - s1 = peg$parseline_start(); - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - s3 = peg$parseNEXT_ROW(); - if (s3 !== peg$FAILED) { - s4 = peg$parsematrix(); - if (s4 !== peg$FAILED) { - peg$savedPos = s2; - s3 = peg$c152(s1, s4); - s2 = s3; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 === peg$FAILED) { - s2 = null; - } - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c153(s1, s2); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parseline_start() { - var s0, s1, s2; - - var key = peg$currPos * 121 + 28, - cached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - s1 = peg$parseHLINE(); - if (s1 !== peg$FAILED) { - s2 = peg$parseline_start(); - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c154(s1, s2); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$parseline(); - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parseline() { - var s0, s1, s2, s3, s4; - - var key = peg$currPos * 121 + 29, - cached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - s1 = peg$parseexpr(); - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - s3 = peg$parseNEXT_CELL(); - if (s3 !== peg$FAILED) { - s4 = peg$parseline(); - if (s4 !== peg$FAILED) { - peg$savedPos = s2; - s3 = peg$c155(s1, s4); - s2 = s3; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 === peg$FAILED) { - s2 = null; - } - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c156(s1, s2); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parsemultline() { - var s0, s1, s2, s3, s4; - - var key = peg$currPos * 121 + 30, - cached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - s1 = peg$parsemline_start(); - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - s3 = peg$parseNEXT_ROW(); - if (s3 !== peg$FAILED) { - s4 = peg$parsemultline(); - if (s4 !== peg$FAILED) { - peg$savedPos = s2; - s3 = peg$c152(s1, s4); - s2 = s3; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 === peg$FAILED) { - s2 = null; - } - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c153(s1, s2); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parsemline_start() { - var s0, s1, s2; - - var key = peg$currPos * 121 + 31, - cached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - s1 = peg$parseHLINE(); - if (s1 !== peg$FAILED) { - s2 = peg$parsemline_start(); - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c157(s1, s2); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parseexpr(); - if (s1 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c158(s1); - } - s0 = s1; - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parsecolumn_spec() { - var s0, s1, s2, s3, s4; - - var key = peg$currPos * 121 + 32, - cached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - s1 = peg$parseCURLY_OPEN(); - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - s3 = []; - s4 = peg$parseone_col(); - if (s4 !== peg$FAILED) { - while (s4 !== peg$FAILED) { - s3.push(s4); - s4 = peg$parseone_col(); - } - } else { - s3 = peg$FAILED; - } - if (s3 !== peg$FAILED) { - peg$savedPos = s2; - s3 = peg$c159(); - } - s2 = s3; - if (s2 !== peg$FAILED) { - s3 = peg$parseCURLY_CLOSE(); - if (s3 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c160(s2); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parseone_col() { - var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9; - - var key = peg$currPos * 121 + 33, - cached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - if (peg$c161.test(input.charAt(peg$currPos))) { - s1 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c162); } - } - if (s1 !== peg$FAILED) { - s2 = peg$parse_(); - if (s2 !== peg$FAILED) { - s1 = [s1, s2]; - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 112) { - s1 = peg$c163; - peg$currPos++; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c164); } - } - if (s1 !== peg$FAILED) { - s2 = peg$parseCURLY_OPEN(); - if (s2 !== peg$FAILED) { - s3 = []; - s4 = peg$parseboxchars(); - if (s4 !== peg$FAILED) { - while (s4 !== peg$FAILED) { - s3.push(s4); - s4 = peg$parseboxchars(); - } - } else { - s3 = peg$FAILED; - } - if (s3 !== peg$FAILED) { - s4 = peg$parseCURLY_CLOSE(); - if (s4 !== peg$FAILED) { - s1 = [s1, s2, s3, s4]; - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 42) { - s1 = peg$c165; - peg$currPos++; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c166); } - } - if (s1 !== peg$FAILED) { - s2 = peg$parseCURLY_OPEN(); - if (s2 !== peg$FAILED) { - s3 = []; - if (peg$c167.test(input.charAt(peg$currPos))) { - s4 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c168); } - } - if (s4 !== peg$FAILED) { - while (s4 !== peg$FAILED) { - s3.push(s4); - if (peg$c167.test(input.charAt(peg$currPos))) { - s4 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c168); } - } - } - } else { - s3 = peg$FAILED; - } - if (s3 !== peg$FAILED) { - s4 = peg$parse_(); - if (s4 !== peg$FAILED) { - s5 = peg$parseCURLY_CLOSE(); - if (s5 !== peg$FAILED) { - s6 = peg$parseone_col(); - if (s6 === peg$FAILED) { - s6 = peg$currPos; - s7 = peg$parseCURLY_OPEN(); - if (s7 !== peg$FAILED) { - s8 = []; - s9 = peg$parseone_col(); - if (s9 !== peg$FAILED) { - while (s9 !== peg$FAILED) { - s8.push(s9); - s9 = peg$parseone_col(); - } - } else { - s8 = peg$FAILED; - } - if (s8 !== peg$FAILED) { - s9 = peg$parseCURLY_CLOSE(); - if (s9 !== peg$FAILED) { - s7 = [s7, s8, s9]; - s6 = s7; - } else { - peg$currPos = s6; - s6 = peg$FAILED; - } - } else { - peg$currPos = s6; - s6 = peg$FAILED; - } - } else { - peg$currPos = s6; - s6 = peg$FAILED; - } - } - if (s6 !== peg$FAILED) { - s1 = [s1, s2, s3, s4, s5, s6]; - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - if (input.substr(peg$currPos, 2) === peg$c169) { - s1 = peg$c169; - peg$currPos += 2; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c170); } - } - if (s1 !== peg$FAILED) { - s2 = peg$parse_(); - if (s2 !== peg$FAILED) { - s1 = [s1, s2]; - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 124) { - s1 = peg$c171; - peg$currPos++; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c172); } - } - if (s1 !== peg$FAILED) { - s2 = peg$parse_(); - if (s2 !== peg$FAILED) { - s1 = [s1, s2]; - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 64) { - s1 = peg$c173; - peg$currPos++; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c174); } - } - if (s1 !== peg$FAILED) { - s2 = peg$parse_(); - if (s2 !== peg$FAILED) { - s3 = peg$parseCURLY_OPEN(); - if (s3 !== peg$FAILED) { - s4 = []; - s5 = peg$parseboxchars(); - if (s5 !== peg$FAILED) { - while (s5 !== peg$FAILED) { - s4.push(s5); - s5 = peg$parseboxchars(); - } - } else { - s4 = peg$FAILED; - } - if (s4 !== peg$FAILED) { - s5 = peg$parseCURLY_CLOSE(); - if (s5 !== peg$FAILED) { - s1 = [s1, s2, s3, s4, s5]; - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } - } - } - } - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parsealignat_spec() { - var s0, s1, s2, s3, s4; - - var key = peg$currPos * 121 + 34, - cached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - s1 = peg$parseCURLY_OPEN(); - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - s3 = []; - if (peg$c167.test(input.charAt(peg$currPos))) { - s4 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c168); } - } - if (s4 !== peg$FAILED) { - while (s4 !== peg$FAILED) { - s3.push(s4); - if (peg$c167.test(input.charAt(peg$currPos))) { - s4 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c168); } - } - } - } else { - s3 = peg$FAILED; - } - if (s3 !== peg$FAILED) { - peg$savedPos = s2; - s3 = peg$c159(); - } - s2 = s3; - if (s2 !== peg$FAILED) { - s3 = peg$parse_(); - if (s3 !== peg$FAILED) { - s4 = peg$parseCURLY_CLOSE(); - if (s4 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c175(s2); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parseopt_pos() { - var s0, s1, s2, s3, s4, s5, s6; - - var key = peg$currPos * 121 + 35, - cached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 91) { - s1 = peg$c111; - peg$currPos++; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c112); } - } - if (s1 !== peg$FAILED) { - s2 = peg$parse_(); - if (s2 !== peg$FAILED) { - if (peg$c176.test(input.charAt(peg$currPos))) { - s3 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s3 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c177); } - } - if (s3 !== peg$FAILED) { - s4 = peg$parse_(); - if (s4 !== peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 93) { - s5 = peg$c113; - peg$currPos++; - } else { - s5 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c114); } - } - if (s5 !== peg$FAILED) { - s6 = peg$parse_(); - if (s6 !== peg$FAILED) { - s1 = [s1, s2, s3, s4, s5, s6]; - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$c50; - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parsealpha() { - var s0; - - var key = peg$currPos * 121 + 36, - cached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - if (peg$c178.test(input.charAt(peg$currPos))) { - s0 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c179); } - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parseliteral_id() { - var s0; - - var key = peg$currPos * 121 + 37, - cached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - if (peg$c178.test(input.charAt(peg$currPos))) { - s0 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c179); } - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parseliteral_mn() { - var s0; - - var key = peg$currPos * 121 + 38, - cached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - if (peg$c167.test(input.charAt(peg$currPos))) { - s0 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c168); } - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parseliteral_uf_lt() { - var s0; - - var key = peg$currPos * 121 + 39, - cached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - if (peg$c180.test(input.charAt(peg$currPos))) { - s0 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c181); } - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parsedelimiter_uf_lt() { - var s0; - - var key = peg$currPos * 121 + 40, - cached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - if (peg$c182.test(input.charAt(peg$currPos))) { - s0 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c183); } - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parseliteral_uf_op() { - var s0; - - var key = peg$currPos * 121 + 41, - cached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - if (peg$c184.test(input.charAt(peg$currPos))) { - s0 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c185); } - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parsedelimiter_uf_op() { - var s0; - - var key = peg$currPos * 121 + 42, - cached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - if (peg$c186.test(input.charAt(peg$currPos))) { - s0 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c187); } - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parsenum() { - var s0, s1, s2, s3, s4, s5, s6; - - var key = peg$currPos * 121 + 43, - cached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 45) { - s1 = peg$c188; - peg$currPos++; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c189); } - } - if (s1 === peg$FAILED) { - s1 = null; - } - if (s1 !== peg$FAILED) { - s2 = []; - if (peg$c167.test(input.charAt(peg$currPos))) { - s3 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s3 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c168); } - } - while (s3 !== peg$FAILED) { - s2.push(s3); - if (peg$c167.test(input.charAt(peg$currPos))) { - s3 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s3 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c168); } - } - } - if (s2 !== peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 46) { - s3 = peg$c190; - peg$currPos++; - } else { - s3 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c191); } - } - if (s3 !== peg$FAILED) { - s4 = []; - if (peg$c167.test(input.charAt(peg$currPos))) { - s5 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s5 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c168); } - } - if (s5 !== peg$FAILED) { - while (s5 !== peg$FAILED) { - s4.push(s5); - if (peg$c167.test(input.charAt(peg$currPos))) { - s5 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s5 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c168); } - } - } - } else { - s4 = peg$FAILED; - } - if (s4 !== peg$FAILED) { - s5 = peg$parse_(); - if (s5 !== peg$FAILED) { - s6 = peg$parsespce(); - if (s6 === peg$FAILED) { - s6 = null; - } - if (s6 !== peg$FAILED) { - s1 = [s1, s2, s3, s4, s5, s6]; - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 45) { - s1 = peg$c188; - peg$currPos++; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c189); } - } - if (s1 === peg$FAILED) { - s1 = null; - } - if (s1 !== peg$FAILED) { - s2 = []; - if (peg$c167.test(input.charAt(peg$currPos))) { - s3 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s3 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c168); } - } - if (s3 !== peg$FAILED) { - while (s3 !== peg$FAILED) { - s2.push(s3); - if (peg$c167.test(input.charAt(peg$currPos))) { - s3 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s3 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c168); } - } - } - } else { - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 46) { - s3 = peg$c190; - peg$currPos++; - } else { - s3 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c191); } - } - if (s3 === peg$FAILED) { - s3 = null; - } - if (s3 !== peg$FAILED) { - s4 = peg$parse_(); - if (s4 !== peg$FAILED) { - s5 = peg$parsespce(); - if (s5 === peg$FAILED) { - s5 = null; - } - if (s5 !== peg$FAILED) { - s1 = [s1, s2, s3, s4, s5]; - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parsespce() { - var s0; - - var key = peg$currPos * 121 + 44, - cached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - if (input.substr(peg$currPos, 2) === peg$c192) { - s0 = peg$c192; - peg$currPos += 2; - } else { - s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c193); } - } - if (s0 === peg$FAILED) { - if (input.substr(peg$currPos, 2) === peg$c194) { - s0 = peg$c194; - peg$currPos += 2; - } else { - s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c195); } - } - if (s0 === peg$FAILED) { - if (input.substr(peg$currPos, 2) === peg$c196) { - s0 = peg$c196; - peg$currPos += 2; - } else { - s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c197); } - } - if (s0 === peg$FAILED) { - if (input.substr(peg$currPos, 2) === peg$c198) { - s0 = peg$c198; - peg$currPos += 2; - } else { - s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c199); } - } - if (s0 === peg$FAILED) { - if (input.substr(peg$currPos, 2) === peg$c200) { - s0 = peg$c200; - peg$currPos += 2; - } else { - s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c201); } - } - if (s0 === peg$FAILED) { - if (input.substr(peg$currPos, 2) === peg$c202) { - s0 = peg$c202; - peg$currPos += 2; - } else { - s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c203); } - } - if (s0 === peg$FAILED) { - if (input.substr(peg$currPos, 2) === peg$c204) { - s0 = peg$c204; - peg$currPos += 2; - } else { - s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c205); } - } - if (s0 === peg$FAILED) { - if (input.substr(peg$currPos, 2) === peg$c206) { - s0 = peg$c206; - peg$currPos += 2; - } else { - s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c207); } - } - if (s0 === peg$FAILED) { - if (input.substr(peg$currPos, 2) === peg$c208) { - s0 = peg$c208; - peg$currPos += 2; - } else { - s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c209); } - } - if (s0 === peg$FAILED) { - if (input.substr(peg$currPos, 2) === peg$c210) { - s0 = peg$c210; - peg$currPos += 2; - } else { - s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c211); } - } - if (s0 === peg$FAILED) { - if (input.substr(peg$currPos, 2) === peg$c212) { - s0 = peg$c212; - peg$currPos += 2; - } else { - s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c213); } - } - if (s0 === peg$FAILED) { - if (input.substr(peg$currPos, 2) === peg$c214) { - s0 = peg$c214; - peg$currPos += 2; - } else { - s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c215); } - } - if (s0 === peg$FAILED) { - if (input.substr(peg$currPos, 2) === peg$c216) { - s0 = peg$c216; - peg$currPos += 2; - } else { - s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c217); } - } - } - } - } - } - } - } - } - } - } - } - } - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parseatsymbol() { - var s0; - - var key = peg$currPos * 121 + 45, - cached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - if (peg$c218.test(input.charAt(peg$currPos))) { - s0 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c219); } - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parseboxchars() { - var s0, s1, s2; - - var key = peg$currPos * 121 + 46, - cached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - if (peg$c220.test(input.charAt(peg$currPos))) { - s0 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c221); } - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - if (peg$c222.test(input.charAt(peg$currPos))) { - s1 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c223); } - } - if (s1 !== peg$FAILED) { - if (peg$c224.test(input.charAt(peg$currPos))) { - s2 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c225); } - } - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c226(s1, s2); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parseBOX() { - var s0, s1, s2, s3, s4, s5, s6, s7; - - var key = peg$currPos * 121 + 47, - cached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - s1 = peg$parsegeneric_func(); - if (s1 !== peg$FAILED) { - peg$savedPos = peg$currPos; - s2 = peg$c227(s1); - if (s2) { - s2 = void 0; - } else { - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - s3 = peg$parse_(); - if (s3 !== peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 123) { - s4 = peg$c35; - peg$currPos++; - } else { - s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c36); } - } - if (s4 !== peg$FAILED) { - s5 = []; - s6 = peg$parseboxchars(); - if (s6 !== peg$FAILED) { - while (s6 !== peg$FAILED) { - s5.push(s6); - s6 = peg$parseboxchars(); - } - } else { - s5 = peg$FAILED; - } - if (s5 !== peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 125) { - s6 = peg$c37; - peg$currPos++; - } else { - s6 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c38); } - } - if (s6 !== peg$FAILED) { - s7 = peg$parse_(); - if (s7 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c228(s1, s5); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parseLITERAL() { - var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9; - - var key = peg$currPos * 121 + 48, - cached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - s1 = peg$parseliteral_id(); - if (s1 === peg$FAILED) { - s1 = peg$parseliteral_mn(); - if (s1 === peg$FAILED) { - s1 = peg$parseliteral_uf_lt(); - if (s1 === peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 45) { - s1 = peg$c188; - peg$currPos++; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c189); } - } - if (s1 === peg$FAILED) { - s1 = peg$parseliteral_uf_op(); - } - } - } - } - if (s1 !== peg$FAILED) { - s2 = peg$parse_(); - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c229(s1); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parsegeneric_func(); - if (s1 !== peg$FAILED) { - peg$savedPos = peg$currPos; - s2 = peg$c230(s1); - if (s2) { - s2 = void 0; - } else { - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - s3 = peg$parse_(); - if (s3 !== peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 40) { - s4 = peg$c231; - peg$currPos++; - } else { - s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c232); } - } - if (s4 === peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 91) { - s4 = peg$c111; - peg$currPos++; - } else { - s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c112); } - } - if (s4 === peg$FAILED) { - if (input.substr(peg$currPos, 2) === peg$c233) { - s4 = peg$c233; - peg$currPos += 2; - } else { - s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c234); } - } - if (s4 === peg$FAILED) { - s4 = peg$currPos; - s5 = peg$c50; - if (s5 !== peg$FAILED) { - peg$savedPos = s4; - s5 = peg$c235(s1); - } - s4 = s5; - } - } - } - if (s4 !== peg$FAILED) { - s5 = peg$parse_(); - if (s5 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c236(s1, s4); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parsegeneric_func(); - if (s1 !== peg$FAILED) { - peg$savedPos = peg$currPos; - s2 = peg$c237(s1); - if (s2) { - s2 = void 0; - } else { - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - s3 = peg$parse_(); - if (s3 !== peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 40) { - s4 = peg$c231; - peg$currPos++; - } else { - s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c232); } - } - if (s4 === peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 91) { - s4 = peg$c111; - peg$currPos++; - } else { - s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c112); } - } - if (s4 === peg$FAILED) { - if (input.substr(peg$currPos, 2) === peg$c233) { - s4 = peg$c233; - peg$currPos += 2; - } else { - s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c234); } - } - if (s4 === peg$FAILED) { - s4 = peg$currPos; - s5 = peg$c50; - if (s5 !== peg$FAILED) { - peg$savedPos = s4; - s5 = peg$c238(s1); - } - s4 = s5; - } - } - } - if (s4 !== peg$FAILED) { - s5 = peg$parse_(); - if (s5 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c239(s1, s4); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parsegeneric_func(); - if (s1 !== peg$FAILED) { - peg$savedPos = peg$currPos; - s2 = peg$c240(s1); - if (s2) { - s2 = void 0; - } else { - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - s3 = peg$parse_(); - if (s3 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c241(s1); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parsegeneric_func(); - if (s1 !== peg$FAILED) { - peg$savedPos = peg$currPos; - s2 = peg$c242(s1); - if (s2) { - s2 = void 0; - } else { - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - s3 = peg$parse_(); - if (s3 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c243(s1); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parsegeneric_func(); - if (s1 !== peg$FAILED) { - peg$savedPos = peg$currPos; - s2 = peg$c244(s1); - if (s2) { - s2 = void 0; - } else { - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - s3 = peg$parse_(); - if (s3 !== peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 123) { - s4 = peg$c35; - peg$currPos++; - } else { - s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c36); } - } - if (s4 !== peg$FAILED) { - s5 = peg$parsegeneric_func(); - if (s5 !== peg$FAILED) { - peg$savedPos = peg$currPos; - s6 = peg$c245(s1, s5); - if (s6) { - s6 = void 0; - } else { - s6 = peg$FAILED; - } - if (s6 !== peg$FAILED) { - s7 = peg$parse_(); - if (s7 !== peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 125) { - s8 = peg$c37; - peg$currPos++; - } else { - s8 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c38); } - } - if (s8 !== peg$FAILED) { - s9 = peg$parse_(); - if (s9 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c246(s1, s5); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parsegeneric_func(); - if (s1 !== peg$FAILED) { - peg$savedPos = peg$currPos; - s2 = peg$c247(s1); - if (s2) { - s2 = void 0; - } else { - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - s3 = peg$parse_(); - if (s3 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c248(s1); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parsegeneric_func(); - if (s1 !== peg$FAILED) { - peg$savedPos = peg$currPos; - s2 = peg$c249(s1); - if (s2) { - s2 = void 0; - } else { - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - s3 = peg$parse_(); - if (s3 !== peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 123) { - s4 = peg$c35; - peg$currPos++; - } else { - s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c36); } - } - if (s4 !== peg$FAILED) { - s5 = peg$parsegeneric_func(); - if (s5 !== peg$FAILED) { - peg$savedPos = peg$currPos; - s6 = peg$c250(s1, s5); - if (s6) { - s6 = void 0; - } else { - s6 = peg$FAILED; - } - if (s6 !== peg$FAILED) { - s7 = peg$parse_(); - if (s7 !== peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 125) { - s8 = peg$c37; - peg$currPos++; - } else { - s8 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c38); } - } - if (s8 !== peg$FAILED) { - s9 = peg$parse_(); - if (s9 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c251(s1, s5); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parseCOLOR(); - if (s1 === peg$FAILED) { - s1 = peg$parseDEFINECOLOR(); - } - if (s1 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c252(s1); - } - s0 = s1; - if (s0 === peg$FAILED) { - s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 92) { - s1 = peg$c253; - peg$currPos++; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c254); } - } - if (s1 !== peg$FAILED) { - if (peg$c255.test(input.charAt(peg$currPos))) { - s2 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c256); } - } - if (s2 !== peg$FAILED) { - s3 = peg$parse_(); - if (s3 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c257(s2); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - if (peg$c258.test(input.charAt(peg$currPos))) { - s1 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c259); } - } - if (s1 !== peg$FAILED) { - s2 = peg$parse_(); - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c229(s1); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - if (peg$c260.test(input.charAt(peg$currPos))) { - s1 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c261); } - } - if (s1 !== peg$FAILED) { - s2 = peg$parse_(); - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c262(s1); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } - } - } - } - } - } - } - } - } - } - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parseLITERALPART() { - var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9; - - var key = peg$currPos * 121 + 49, - cached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - s1 = peg$parsegeneric_func(); - if (s1 !== peg$FAILED) { - peg$savedPos = peg$currPos; - s2 = peg$c230(s1); - if (s2) { - s2 = void 0; - } else { - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - s3 = peg$parse_(); - if (s3 !== peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 40) { - s4 = peg$c231; - peg$currPos++; - } else { - s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c232); } - } - if (s4 === peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 91) { - s4 = peg$c111; - peg$currPos++; - } else { - s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c112); } - } - if (s4 === peg$FAILED) { - if (input.substr(peg$currPos, 2) === peg$c233) { - s4 = peg$c233; - peg$currPos += 2; - } else { - s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c234); } - } - if (s4 === peg$FAILED) { - s4 = peg$currPos; - s5 = peg$c50; - if (s5 !== peg$FAILED) { - peg$savedPos = s4; - s5 = peg$c235(s1); - } - s4 = s5; - } - } - } - if (s4 !== peg$FAILED) { - s5 = peg$parse_(); - if (s5 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c236(s1, s4); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parsegeneric_func(); - if (s1 !== peg$FAILED) { - peg$savedPos = peg$currPos; - s2 = peg$c237(s1); - if (s2) { - s2 = void 0; - } else { - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - s3 = peg$parse_(); - if (s3 !== peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 40) { - s4 = peg$c231; - peg$currPos++; - } else { - s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c232); } - } - if (s4 === peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 91) { - s4 = peg$c111; - peg$currPos++; - } else { - s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c112); } - } - if (s4 === peg$FAILED) { - if (input.substr(peg$currPos, 2) === peg$c233) { - s4 = peg$c233; - peg$currPos += 2; - } else { - s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c234); } - } - if (s4 === peg$FAILED) { - s4 = peg$currPos; - s5 = peg$c50; - if (s5 !== peg$FAILED) { - peg$savedPos = s4; - s5 = peg$c238(s1); - } - s4 = s5; - } - } - } - if (s4 !== peg$FAILED) { - s5 = peg$parse_(); - if (s5 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c239(s1, s4); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parsegeneric_func(); - if (s1 !== peg$FAILED) { - peg$savedPos = peg$currPos; - s2 = peg$c240(s1); - if (s2) { - s2 = void 0; - } else { - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - s3 = peg$parse_(); - if (s3 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c241(s1); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parsegeneric_func(); - if (s1 !== peg$FAILED) { - peg$savedPos = peg$currPos; - s2 = peg$c247(s1); - if (s2) { - s2 = void 0; - } else { - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - s3 = peg$parse_(); - if (s3 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c248(s1); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parsegeneric_func(); - if (s1 !== peg$FAILED) { - peg$savedPos = peg$currPos; - s2 = peg$c249(s1); - if (s2) { - s2 = void 0; - } else { - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - s3 = peg$parse_(); - if (s3 !== peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 123) { - s4 = peg$c35; - peg$currPos++; - } else { - s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c36); } - } - if (s4 !== peg$FAILED) { - s5 = peg$parsegeneric_func(); - if (s5 !== peg$FAILED) { - peg$savedPos = peg$currPos; - s6 = peg$c250(s1, s5); - if (s6) { - s6 = void 0; - } else { - s6 = peg$FAILED; - } - if (s6 !== peg$FAILED) { - s7 = peg$parse_(); - if (s7 !== peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 125) { - s8 = peg$c37; - peg$currPos++; - } else { - s8 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c38); } - } - if (s8 !== peg$FAILED) { - s9 = peg$parse_(); - if (s9 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c251(s1, s5); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parsegeneric_func(); - if (s1 !== peg$FAILED) { - peg$savedPos = peg$currPos; - s2 = peg$c96(s1); - if (s2) { - s2 = void 0; - } else { - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - s3 = peg$parse_(); - if (s3 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c263(s1); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parseCOLOR(); - if (s1 === peg$FAILED) { - s1 = peg$parseDEFINECOLOR(); - } - if (s1 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c252(s1); - } - s0 = s1; - if (s0 === peg$FAILED) { - s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 92) { - s1 = peg$c253; - peg$currPos++; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c254); } - } - if (s1 !== peg$FAILED) { - if (peg$c255.test(input.charAt(peg$currPos))) { - s2 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c256); } - } - if (s2 !== peg$FAILED) { - s3 = peg$parse_(); - if (s3 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c257(s2); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - if (peg$c258.test(input.charAt(peg$currPos))) { - s1 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c259); } - } - if (s1 !== peg$FAILED) { - s2 = peg$parse_(); - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c229(s1); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - if (peg$c260.test(input.charAt(peg$currPos))) { - s1 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c261); } - } - if (s1 !== peg$FAILED) { - s2 = peg$parse_(); - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c262(s1); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } - } - } - } - } - } - } - } - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parseDELIMITER() { - var s0, s1, s2, s3; - - var key = peg$currPos * 121 + 50, - cached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - s1 = peg$parsedelimiter_uf_lt(); - if (s1 === peg$FAILED) { - s1 = peg$parsedelimiter_uf_op(); - if (s1 === peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 91) { - s1 = peg$c111; - peg$currPos++; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c112); } - } - } - } - if (s1 !== peg$FAILED) { - s2 = peg$parse_(); - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c229(s1); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 92) { - s1 = peg$c253; - peg$currPos++; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c254); } - } - if (s1 !== peg$FAILED) { - if (peg$c264.test(input.charAt(peg$currPos))) { - s2 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c265); } - } - if (s2 !== peg$FAILED) { - s3 = peg$parse_(); - if (s3 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c257(s2); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parsegeneric_func(); - if (s1 !== peg$FAILED) { - peg$savedPos = peg$currPos; - s2 = peg$c266(s1); - if (s2) { - s2 = void 0; - } else { - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - s3 = peg$parse_(); - if (s3 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c241(s1); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parsegeneric_func(); - if (s1 !== peg$FAILED) { - peg$savedPos = peg$currPos; - s2 = peg$c267(s1); - if (s2) { - s2 = void 0; - } else { - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - s3 = peg$parse_(); - if (s3 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c268(s1); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parseatsymbol(); - if (s1 !== peg$FAILED) { - s2 = peg$parse_(); - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c269(s1); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } - } - } - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parseFUN_AR1nb() { - var s0, s1, s2, s3, s4; - - var key = peg$currPos * 121 + 51, - cached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - s1 = peg$parsegeneric_func(); - if (s1 !== peg$FAILED) { - peg$savedPos = peg$currPos; - s2 = peg$c270(s1); - if (s2) { - s2 = void 0; - } else { - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - s3 = []; - s4 = peg$parsespace(); - while (s4 !== peg$FAILED) { - s3.push(s4); - s4 = peg$parsespace(); - } - if (s3 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c271(s1); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parseFUN_AR1opt() { - var s0, s1, s2, s3, s4, s5, s6; - - var key = peg$currPos * 121 + 52, - cached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - s1 = peg$parsegeneric_func(); - if (s1 !== peg$FAILED) { - peg$savedPos = peg$currPos; - s2 = peg$c272(s1); - if (s2) { - s2 = void 0; - } else { - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - s3 = []; - s4 = peg$parsespace(); - while (s4 !== peg$FAILED) { - s3.push(s4); - s4 = peg$parsespace(); - } - if (s3 !== peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 91) { - s4 = peg$c111; - peg$currPos++; - } else { - s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c112); } - } - if (s4 !== peg$FAILED) { - s5 = []; - s6 = peg$parsespace(); - while (s6 !== peg$FAILED) { - s5.push(s6); - s6 = peg$parsespace(); - } - if (s5 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c271(s1); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parseNEXT_CELL() { - var s0, s1, s2; - - var key = peg$currPos * 121 + 53, - cached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 38) { - s1 = peg$c273; - peg$currPos++; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c274); } - } - if (s1 !== peg$FAILED) { - s2 = peg$parse_(); - if (s2 !== peg$FAILED) { - s1 = [s1, s2]; - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parseNEXT_ROW() { - var s0, s1, s2; - - var key = peg$currPos * 121 + 54, - cached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - if (input.substr(peg$currPos, 2) === peg$c275) { - s1 = peg$c275; - peg$currPos += 2; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c276); } - } - if (s1 !== peg$FAILED) { - s2 = peg$parse_(); - if (s2 !== peg$FAILED) { - s1 = [s1, s2]; - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parseBEGIN() { - var s0, s1, s2; - - var key = peg$currPos * 121 + 55, - cached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - if (input.substr(peg$currPos, 6) === peg$c277) { - s1 = peg$c277; - peg$currPos += 6; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c278); } - } - if (s1 !== peg$FAILED) { - s2 = peg$parse_(); - if (s2 !== peg$FAILED) { - s1 = [s1, s2]; - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parseEND() { - var s0, s1, s2; - - var key = peg$currPos * 121 + 56, - cached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - if (input.substr(peg$currPos, 4) === peg$c279) { - s1 = peg$c279; - peg$currPos += 4; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c280); } - } - if (s1 !== peg$FAILED) { - s2 = peg$parse_(); - if (s2 !== peg$FAILED) { - s1 = [s1, s2]; - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parseBEGIN_MATRIX() { - var s0, s1, s2, s3; - - var key = peg$currPos * 121 + 57, - cached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - s1 = peg$parseBEGIN(); - if (s1 !== peg$FAILED) { - if (input.substr(peg$currPos, 8) === peg$c281) { - s2 = peg$c281; - peg$currPos += 8; - } else { - s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c282); } - } - if (s2 !== peg$FAILED) { - s3 = peg$parse_(); - if (s3 !== peg$FAILED) { - s1 = [s1, s2, s3]; - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parseEND_MATRIX() { - var s0, s1, s2, s3; - - var key = peg$currPos * 121 + 58, - cached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - s1 = peg$parseEND(); - if (s1 !== peg$FAILED) { - if (input.substr(peg$currPos, 8) === peg$c281) { - s2 = peg$c281; - peg$currPos += 8; - } else { - s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c282); } - } - if (s2 !== peg$FAILED) { - s3 = peg$parse_(); - if (s3 !== peg$FAILED) { - s1 = [s1, s2, s3]; - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parseBEGIN_PMATRIX() { - var s0, s1, s2, s3; - - var key = peg$currPos * 121 + 59, - cached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - s1 = peg$parseBEGIN(); - if (s1 !== peg$FAILED) { - if (input.substr(peg$currPos, 9) === peg$c283) { - s2 = peg$c283; - peg$currPos += 9; - } else { - s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c284); } - } - if (s2 !== peg$FAILED) { - s3 = peg$parse_(); - if (s3 !== peg$FAILED) { - s1 = [s1, s2, s3]; - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parseEND_PMATRIX() { - var s0, s1, s2, s3; - - var key = peg$currPos * 121 + 60, - cached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - s1 = peg$parseEND(); - if (s1 !== peg$FAILED) { - if (input.substr(peg$currPos, 9) === peg$c283) { - s2 = peg$c283; - peg$currPos += 9; - } else { - s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c284); } - } - if (s2 !== peg$FAILED) { - s3 = peg$parse_(); - if (s3 !== peg$FAILED) { - s1 = [s1, s2, s3]; - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parseBEGIN_BMATRIX() { - var s0, s1, s2, s3; - - var key = peg$currPos * 121 + 61, - cached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - s1 = peg$parseBEGIN(); - if (s1 !== peg$FAILED) { - if (input.substr(peg$currPos, 9) === peg$c285) { - s2 = peg$c285; - peg$currPos += 9; - } else { - s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c286); } - } - if (s2 !== peg$FAILED) { - s3 = peg$parse_(); - if (s3 !== peg$FAILED) { - s1 = [s1, s2, s3]; - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parseEND_BMATRIX() { - var s0, s1, s2, s3; - - var key = peg$currPos * 121 + 62, - cached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - s1 = peg$parseEND(); - if (s1 !== peg$FAILED) { - if (input.substr(peg$currPos, 9) === peg$c285) { - s2 = peg$c285; - peg$currPos += 9; - } else { - s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c286); } - } - if (s2 !== peg$FAILED) { - s3 = peg$parse_(); - if (s3 !== peg$FAILED) { - s1 = [s1, s2, s3]; - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parseBEGIN_BBMATRIX() { - var s0, s1, s2, s3; - - var key = peg$currPos * 121 + 63, - cached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - s1 = peg$parseBEGIN(); - if (s1 !== peg$FAILED) { - if (input.substr(peg$currPos, 9) === peg$c287) { - s2 = peg$c287; - peg$currPos += 9; - } else { - s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c288); } - } - if (s2 !== peg$FAILED) { - s3 = peg$parse_(); - if (s3 !== peg$FAILED) { - s1 = [s1, s2, s3]; - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parseEND_BBMATRIX() { - var s0, s1, s2, s3; - - var key = peg$currPos * 121 + 64, - cached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - s1 = peg$parseEND(); - if (s1 !== peg$FAILED) { - if (input.substr(peg$currPos, 9) === peg$c287) { - s2 = peg$c287; - peg$currPos += 9; - } else { - s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c288); } - } - if (s2 !== peg$FAILED) { - s3 = peg$parse_(); - if (s3 !== peg$FAILED) { - s1 = [s1, s2, s3]; - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parseBEGIN_VMATRIX() { - var s0, s1, s2, s3; - - var key = peg$currPos * 121 + 65, - cached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - s1 = peg$parseBEGIN(); - if (s1 !== peg$FAILED) { - if (input.substr(peg$currPos, 9) === peg$c289) { - s2 = peg$c289; - peg$currPos += 9; - } else { - s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c290); } - } - if (s2 !== peg$FAILED) { - s3 = peg$parse_(); - if (s3 !== peg$FAILED) { - s1 = [s1, s2, s3]; - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parseEND_VMATRIX() { - var s0, s1, s2, s3; - - var key = peg$currPos * 121 + 66, - cached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - s1 = peg$parseEND(); - if (s1 !== peg$FAILED) { - if (input.substr(peg$currPos, 9) === peg$c289) { - s2 = peg$c289; - peg$currPos += 9; - } else { - s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c290); } - } - if (s2 !== peg$FAILED) { - s3 = peg$parse_(); - if (s3 !== peg$FAILED) { - s1 = [s1, s2, s3]; - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parseBEGIN_VVMATRIX() { - var s0, s1, s2, s3; - - var key = peg$currPos * 121 + 67, - cached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - s1 = peg$parseBEGIN(); - if (s1 !== peg$FAILED) { - if (input.substr(peg$currPos, 9) === peg$c291) { - s2 = peg$c291; - peg$currPos += 9; - } else { - s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c292); } - } - if (s2 !== peg$FAILED) { - s3 = peg$parse_(); - if (s3 !== peg$FAILED) { - s1 = [s1, s2, s3]; - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parseEND_VVMATRIX() { - var s0, s1, s2, s3; - - var key = peg$currPos * 121 + 68, - cached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - s1 = peg$parseEND(); - if (s1 !== peg$FAILED) { - if (input.substr(peg$currPos, 9) === peg$c291) { - s2 = peg$c291; - peg$currPos += 9; - } else { - s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c292); } - } - if (s2 !== peg$FAILED) { - s3 = peg$parse_(); - if (s3 !== peg$FAILED) { - s1 = [s1, s2, s3]; - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parseBEGIN_ARRAY() { - var s0, s1, s2, s3; - - var key = peg$currPos * 121 + 69, - cached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - s1 = peg$parseBEGIN(); - if (s1 !== peg$FAILED) { - if (input.substr(peg$currPos, 7) === peg$c293) { - s2 = peg$c293; - peg$currPos += 7; - } else { - s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c294); } - } - if (s2 !== peg$FAILED) { - s3 = peg$parse_(); - if (s3 !== peg$FAILED) { - s1 = [s1, s2, s3]; - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parseEND_ARRAY() { - var s0, s1, s2, s3; - - var key = peg$currPos * 121 + 70, - cached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - s1 = peg$parseEND(); - if (s1 !== peg$FAILED) { - if (input.substr(peg$currPos, 7) === peg$c293) { - s2 = peg$c293; - peg$currPos += 7; - } else { - s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c294); } - } - if (s2 !== peg$FAILED) { - s3 = peg$parse_(); - if (s3 !== peg$FAILED) { - s1 = [s1, s2, s3]; - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parseBEGIN_ALIGN() { - var s0, s1, s2, s3; - - var key = peg$currPos * 121 + 71, - cached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - s1 = peg$parseBEGIN(); - if (s1 !== peg$FAILED) { - if (input.substr(peg$currPos, 7) === peg$c295) { - s2 = peg$c295; - peg$currPos += 7; - } else { - s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c296); } - } - if (s2 !== peg$FAILED) { - s3 = peg$parse_(); - if (s3 !== peg$FAILED) { - s1 = [s1, s2, s3]; - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parseEND_ALIGN() { - var s0, s1, s2, s3; - - var key = peg$currPos * 121 + 72, - cached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - s1 = peg$parseEND(); - if (s1 !== peg$FAILED) { - if (input.substr(peg$currPos, 7) === peg$c295) { - s2 = peg$c295; - peg$currPos += 7; - } else { - s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c296); } - } - if (s2 !== peg$FAILED) { - s3 = peg$parse_(); - if (s3 !== peg$FAILED) { - s1 = [s1, s2, s3]; - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parseBEGIN_ALIGNED() { - var s0, s1, s2, s3; - - var key = peg$currPos * 121 + 73, - cached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - s1 = peg$parseBEGIN(); - if (s1 !== peg$FAILED) { - if (input.substr(peg$currPos, 9) === peg$c297) { - s2 = peg$c297; - peg$currPos += 9; - } else { - s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c298); } - } - if (s2 !== peg$FAILED) { - s3 = peg$parse_(); - if (s3 !== peg$FAILED) { - s1 = [s1, s2, s3]; - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parseEND_ALIGNED() { - var s0, s1, s2, s3; - - var key = peg$currPos * 121 + 74, - cached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - s1 = peg$parseEND(); - if (s1 !== peg$FAILED) { - if (input.substr(peg$currPos, 9) === peg$c297) { - s2 = peg$c297; - peg$currPos += 9; - } else { - s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c298); } - } - if (s2 !== peg$FAILED) { - s3 = peg$parse_(); - if (s3 !== peg$FAILED) { - s1 = [s1, s2, s3]; - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parseBEGIN_ALIGNAT() { - var s0, s1, s2, s3; - - var key = peg$currPos * 121 + 75, - cached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - s1 = peg$parseBEGIN(); - if (s1 !== peg$FAILED) { - if (input.substr(peg$currPos, 9) === peg$c299) { - s2 = peg$c299; - peg$currPos += 9; - } else { - s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c300); } - } - if (s2 !== peg$FAILED) { - s3 = peg$parse_(); - if (s3 !== peg$FAILED) { - s1 = [s1, s2, s3]; - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parseEND_ALIGNAT() { - var s0, s1, s2, s3; - - var key = peg$currPos * 121 + 76, - cached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - s1 = peg$parseEND(); - if (s1 !== peg$FAILED) { - if (input.substr(peg$currPos, 9) === peg$c299) { - s2 = peg$c299; - peg$currPos += 9; - } else { - s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c300); } - } - if (s2 !== peg$FAILED) { - s3 = peg$parse_(); - if (s3 !== peg$FAILED) { - s1 = [s1, s2, s3]; - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parseBEGIN_ALIGNEDAT() { - var s0, s1, s2, s3; - - var key = peg$currPos * 121 + 77, - cached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - s1 = peg$parseBEGIN(); - if (s1 !== peg$FAILED) { - if (input.substr(peg$currPos, 11) === peg$c301) { - s2 = peg$c301; - peg$currPos += 11; - } else { - s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c302); } - } - if (s2 !== peg$FAILED) { - s3 = peg$parse_(); - if (s3 !== peg$FAILED) { - s1 = [s1, s2, s3]; - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parseEND_ALIGNEDAT() { - var s0, s1, s2, s3; - - var key = peg$currPos * 121 + 78, - cached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - s1 = peg$parseEND(); - if (s1 !== peg$FAILED) { - if (input.substr(peg$currPos, 11) === peg$c301) { - s2 = peg$c301; - peg$currPos += 11; - } else { - s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c302); } - } - if (s2 !== peg$FAILED) { - s3 = peg$parse_(); - if (s3 !== peg$FAILED) { - s1 = [s1, s2, s3]; - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parseBEGIN_SMALLMATRIX() { - var s0, s1, s2, s3; - - var key = peg$currPos * 121 + 79, - cached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - s1 = peg$parseBEGIN(); - if (s1 !== peg$FAILED) { - if (input.substr(peg$currPos, 13) === peg$c303) { - s2 = peg$c303; - peg$currPos += 13; - } else { - s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c304); } - } - if (s2 !== peg$FAILED) { - s3 = peg$parse_(); - if (s3 !== peg$FAILED) { - s1 = [s1, s2, s3]; - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parseEND_SMALLMATRIX() { - var s0, s1, s2, s3; - - var key = peg$currPos * 121 + 80, - cached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - s1 = peg$parseEND(); - if (s1 !== peg$FAILED) { - if (input.substr(peg$currPos, 13) === peg$c303) { - s2 = peg$c303; - peg$currPos += 13; - } else { - s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c304); } - } - if (s2 !== peg$FAILED) { - s3 = peg$parse_(); - if (s3 !== peg$FAILED) { - s1 = [s1, s2, s3]; - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parseBEGIN_CASES() { - var s0, s1, s2, s3; - - var key = peg$currPos * 121 + 81, - cached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - s1 = peg$parseBEGIN(); - if (s1 !== peg$FAILED) { - if (input.substr(peg$currPos, 7) === peg$c305) { - s2 = peg$c305; - peg$currPos += 7; - } else { - s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c306); } - } - if (s2 !== peg$FAILED) { - s3 = peg$parse_(); - if (s3 !== peg$FAILED) { - s1 = [s1, s2, s3]; - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parseEND_CASES() { - var s0, s1, s2, s3; - - var key = peg$currPos * 121 + 82, - cached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - s1 = peg$parseEND(); - if (s1 !== peg$FAILED) { - if (input.substr(peg$currPos, 7) === peg$c305) { - s2 = peg$c305; - peg$currPos += 7; - } else { - s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c306); } - } - if (s2 !== peg$FAILED) { - s3 = peg$parse_(); - if (s3 !== peg$FAILED) { - s1 = [s1, s2, s3]; - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parseBEGIN_MULTLINE() { - var s0, s1, s2, s3; - - var key = peg$currPos * 121 + 83, - cached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - s1 = peg$parseBEGIN(); - if (s1 !== peg$FAILED) { - if (input.substr(peg$currPos, 10) === peg$c307) { - s2 = peg$c307; - peg$currPos += 10; - } else { - s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c308); } - } - if (s2 !== peg$FAILED) { - s3 = peg$parse_(); - if (s3 !== peg$FAILED) { - s1 = [s1, s2, s3]; - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parseEND_MULTLINE() { - var s0, s1, s2, s3; - - var key = peg$currPos * 121 + 84, - cached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - s1 = peg$parseEND(); - if (s1 !== peg$FAILED) { - if (input.substr(peg$currPos, 10) === peg$c307) { - s2 = peg$c307; - peg$currPos += 10; - } else { - s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c308); } - } - if (s2 !== peg$FAILED) { - s3 = peg$parse_(); - if (s3 !== peg$FAILED) { - s1 = [s1, s2, s3]; - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parseBEGIN_MULTLINE_STAR() { - var s0, s1, s2, s3; - - var key = peg$currPos * 121 + 85, - cached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - s1 = peg$parseBEGIN(); - if (s1 !== peg$FAILED) { - if (input.substr(peg$currPos, 11) === peg$c309) { - s2 = peg$c309; - peg$currPos += 11; - } else { - s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c310); } - } - if (s2 !== peg$FAILED) { - s3 = peg$parse_(); - if (s3 !== peg$FAILED) { - s1 = [s1, s2, s3]; - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parseEND_MULTLINE_STAR() { - var s0, s1, s2, s3; - - var key = peg$currPos * 121 + 86, - cached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - s1 = peg$parseEND(); - if (s1 !== peg$FAILED) { - if (input.substr(peg$currPos, 11) === peg$c309) { - s2 = peg$c309; - peg$currPos += 11; - } else { - s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c310); } - } - if (s2 !== peg$FAILED) { - s3 = peg$parse_(); - if (s3 !== peg$FAILED) { - s1 = [s1, s2, s3]; - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parseSQ_CLOSE() { - var s0, s1, s2; - - var key = peg$currPos * 121 + 87, - cached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 93) { - s1 = peg$c113; - peg$currPos++; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c114); } - } - if (s1 !== peg$FAILED) { - s2 = peg$parse_(); - if (s2 !== peg$FAILED) { - s1 = [s1, s2]; - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parseCURLY_OPEN() { - var s0, s1, s2; - - var key = peg$currPos * 121 + 88, - cached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 123) { - s1 = peg$c35; - peg$currPos++; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c36); } - } - if (s1 !== peg$FAILED) { - s2 = peg$parse_(); - if (s2 !== peg$FAILED) { - s1 = [s1, s2]; - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parseCURLY_CLOSE() { - var s0, s1, s2; - - var key = peg$currPos * 121 + 89, - cached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 125) { - s1 = peg$c37; - peg$currPos++; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c38); } - } - if (s1 !== peg$FAILED) { - s2 = peg$parse_(); - if (s2 !== peg$FAILED) { - s1 = [s1, s2]; - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parsePAREN_OPEN() { - var s0, s1, s2; - - var key = peg$currPos * 121 + 90, - cached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 40) { - s1 = peg$c231; - peg$currPos++; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c232); } - } - if (s1 !== peg$FAILED) { - s2 = peg$parse_(); - if (s2 !== peg$FAILED) { - s1 = [s1, s2]; - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - if (input.substr(peg$currPos, 5) === peg$c311) { - s1 = peg$c311; - peg$currPos += 5; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c312); } - } - if (s1 !== peg$FAILED) { - s2 = peg$parse_(); - if (s2 !== peg$FAILED) { - s1 = [s1, s2]; - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - if (input.substr(peg$currPos, 5) === peg$c313) { - s1 = peg$c313; - peg$currPos += 5; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c314); } - } - if (s1 !== peg$FAILED) { - s2 = peg$parse_(); - if (s2 !== peg$FAILED) { - s1 = [s1, s2]; - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - if (input.substr(peg$currPos, 6) === peg$c315) { - s1 = peg$c315; - peg$currPos += 6; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c316); } - } - if (s1 !== peg$FAILED) { - s2 = peg$parse_(); - if (s2 !== peg$FAILED) { - s1 = [s1, s2]; - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - if (input.substr(peg$currPos, 6) === peg$c317) { - s1 = peg$c317; - peg$currPos += 6; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c318); } - } - if (s1 !== peg$FAILED) { - s2 = peg$parse_(); - if (s2 !== peg$FAILED) { - s1 = [s1, s2]; - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - if (input.substr(peg$currPos, 6) === peg$c319) { - s1 = peg$c319; - peg$currPos += 6; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c320); } - } - if (s1 !== peg$FAILED) { - s2 = peg$parse_(); - if (s2 !== peg$FAILED) { - s1 = [s1, s2]; - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - if (input.substr(peg$currPos, 6) === peg$c321) { - s1 = peg$c321; - peg$currPos += 6; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c322); } - } - if (s1 !== peg$FAILED) { - s2 = peg$parse_(); - if (s2 !== peg$FAILED) { - s1 = [s1, s2]; - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - if (input.substr(peg$currPos, 7) === peg$c323) { - s1 = peg$c323; - peg$currPos += 7; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c324); } - } - if (s1 !== peg$FAILED) { - s2 = peg$parse_(); - if (s2 !== peg$FAILED) { - s1 = [s1, s2]; - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - if (input.substr(peg$currPos, 7) === peg$c325) { - s1 = peg$c325; - peg$currPos += 7; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c326); } - } - if (s1 !== peg$FAILED) { - s2 = peg$parse_(); - if (s2 !== peg$FAILED) { - s1 = [s1, s2]; - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - if (input.substr(peg$currPos, 6) === peg$c327) { - s1 = peg$c327; - peg$currPos += 6; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c328); } - } - if (s1 !== peg$FAILED) { - s2 = peg$parse_(); - if (s2 !== peg$FAILED) { - s1 = [s1, s2]; - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } - } - } - } - } - } - } - } - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parsePAREN_CLOSE() { - var s0, s1, s2; - - var key = peg$currPos * 121 + 91, - cached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 41) { - s1 = peg$c329; - peg$currPos++; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c330); } - } - if (s1 !== peg$FAILED) { - s2 = peg$parse_(); - if (s2 !== peg$FAILED) { - s1 = [s1, s2]; - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - if (input.substr(peg$currPos, 5) === peg$c331) { - s1 = peg$c331; - peg$currPos += 5; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c332); } - } - if (s1 !== peg$FAILED) { - s2 = peg$parse_(); - if (s2 !== peg$FAILED) { - s1 = [s1, s2]; - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - if (input.substr(peg$currPos, 5) === peg$c333) { - s1 = peg$c333; - peg$currPos += 5; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c334); } - } - if (s1 !== peg$FAILED) { - s2 = peg$parse_(); - if (s2 !== peg$FAILED) { - s1 = [s1, s2]; - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - if (input.substr(peg$currPos, 6) === peg$c335) { - s1 = peg$c335; - peg$currPos += 6; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c336); } - } - if (s1 !== peg$FAILED) { - s2 = peg$parse_(); - if (s2 !== peg$FAILED) { - s1 = [s1, s2]; - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - if (input.substr(peg$currPos, 6) === peg$c337) { - s1 = peg$c337; - peg$currPos += 6; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c338); } - } - if (s1 !== peg$FAILED) { - s2 = peg$parse_(); - if (s2 !== peg$FAILED) { - s1 = [s1, s2]; - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - if (input.substr(peg$currPos, 6) === peg$c339) { - s1 = peg$c339; - peg$currPos += 6; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c340); } - } - if (s1 !== peg$FAILED) { - s2 = peg$parse_(); - if (s2 !== peg$FAILED) { - s1 = [s1, s2]; - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - if (input.substr(peg$currPos, 6) === peg$c341) { - s1 = peg$c341; - peg$currPos += 6; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c342); } - } - if (s1 !== peg$FAILED) { - s2 = peg$parse_(); - if (s2 !== peg$FAILED) { - s1 = [s1, s2]; - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - if (input.substr(peg$currPos, 7) === peg$c343) { - s1 = peg$c343; - peg$currPos += 7; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c344); } - } - if (s1 !== peg$FAILED) { - s2 = peg$parse_(); - if (s2 !== peg$FAILED) { - s1 = [s1, s2]; - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - if (input.substr(peg$currPos, 7) === peg$c345) { - s1 = peg$c345; - peg$currPos += 7; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c346); } - } - if (s1 !== peg$FAILED) { - s2 = peg$parse_(); - if (s2 !== peg$FAILED) { - s1 = [s1, s2]; - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - if (input.substr(peg$currPos, 7) === peg$c347) { - s0 = peg$c347; - peg$currPos += 7; - } else { - s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c348); } - } - } - } - } - } - } - } - } - } - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parseSUP() { - var s0, s1, s2; - - var key = peg$currPos * 121 + 92, - cached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 94) { - s1 = peg$c70; - peg$currPos++; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c71); } - } - if (s1 !== peg$FAILED) { - s2 = peg$parse_(); - if (s2 !== peg$FAILED) { - s1 = [s1, s2]; - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parseSUB() { - var s0, s1, s2; - - var key = peg$currPos * 121 + 93, - cached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 95) { - s1 = peg$c84; - peg$currPos++; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c85); } - } - if (s1 !== peg$FAILED) { - s2 = peg$parse_(); - if (s2 !== peg$FAILED) { - s1 = [s1, s2]; - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parsegeneric_func() { - var s0, s1, s2, s3; - - var key = peg$currPos * 121 + 94, - cached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 92) { - s1 = peg$c253; - peg$currPos++; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c254); } - } - if (s1 !== peg$FAILED) { - s2 = []; - s3 = peg$parsealpha(); - if (s3 !== peg$FAILED) { - while (s3 !== peg$FAILED) { - s2.push(s3); - s3 = peg$parsealpha(); - } - } else { - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c159(); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parseBIG() { - var s0, s1, s2, s3; - - var key = peg$currPos * 121 + 95, - cached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - s1 = peg$parsegeneric_func(); - if (s1 !== peg$FAILED) { - peg$savedPos = peg$currPos; - s2 = peg$c349(s1); - if (s2) { - s2 = void 0; - } else { - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - s3 = peg$parse_(); - if (s3 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c271(s1); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parsePAREN() { - var s0, s1, s2, s3, s4; - - var key = peg$currPos * 121 + 96, - cached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - s1 = peg$parsegeneric_func(); - if (s1 !== peg$FAILED) { - peg$savedPos = peg$currPos; - s2 = peg$c350(s1); - if (s2) { - s2 = void 0; - } else { - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - s3 = []; - s4 = peg$parsespace(); - while (s4 !== peg$FAILED) { - s3.push(s4); - s4 = peg$parsespace(); - } - if (s3 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c271(s1); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parseFUN_AR1() { - var s0, s1, s2, s3, s4; - - var key = peg$currPos * 121 + 97, - cached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - s1 = peg$parsegeneric_func(); - if (s1 !== peg$FAILED) { - peg$savedPos = peg$currPos; - s2 = peg$c351(s1); - if (s2) { - s2 = void 0; - } else { - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - s3 = []; - s4 = peg$parsespace(); - while (s4 !== peg$FAILED) { - s3.push(s4); - s4 = peg$parsespace(); - } - if (s3 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c271(s1); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parsegeneric_func(); - if (s1 !== peg$FAILED) { - peg$savedPos = peg$currPos; - s2 = peg$c352(s1); - if (s2) { - s2 = void 0; - } else { - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - s3 = []; - s4 = peg$parsespace(); - while (s4 !== peg$FAILED) { - s3.push(s4); - s4 = peg$parsespace(); - } - if (s3 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c352(s1); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parseFUN_AR2() { - var s0, s1, s2, s3, s4; - - var key = peg$currPos * 121 + 98, - cached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - s1 = peg$parsegeneric_func(); - if (s1 !== peg$FAILED) { - peg$savedPos = peg$currPos; - s2 = peg$c353(s1); - if (s2) { - s2 = void 0; - } else { - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - s3 = []; - s4 = peg$parsespace(); - while (s4 !== peg$FAILED) { - s3.push(s4); - s4 = peg$parsespace(); - } - if (s3 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c271(s1); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parseFUN_AR3() { - var s0, s1, s2, s3, s4; - - var key = peg$currPos * 121 + 99, - cached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - s1 = peg$parsegeneric_func(); - if (s1 !== peg$FAILED) { - peg$savedPos = peg$currPos; - s2 = peg$c354(s1); - if (s2) { - s2 = void 0; - } else { - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - s3 = []; - s4 = peg$parsespace(); - while (s4 !== peg$FAILED) { - s3.push(s4); - s4 = peg$parsespace(); - } - if (s3 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c271(s1); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parseFUN_INFIX() { - var s0, s1, s2, s3; - - var key = peg$currPos * 121 + 100, - cached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - s1 = peg$parsegeneric_func(); - if (s1 !== peg$FAILED) { - peg$savedPos = peg$currPos; - s2 = peg$c355(s1); - if (s2) { - s2 = void 0; - } else { - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - s3 = peg$parse_(); - if (s3 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c271(s1); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parseJACOBI() { - var s0, s1, s2, s3, s4; - - var key = peg$currPos * 121 + 101, - cached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - s1 = peg$parsegeneric_func(); - if (s1 !== peg$FAILED) { - peg$savedPos = peg$currPos; - s2 = peg$c356(s1); - if (s2) { - s2 = void 0; - } else { - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - s3 = []; - s4 = peg$parsespace(); - while (s4 !== peg$FAILED) { - s3.push(s4); - s4 = peg$parsespace(); - } - if (s3 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c271(s1); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parseLAGUERRE() { - var s0, s1, s2, s3, s4; - - var key = peg$currPos * 121 + 102, - cached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - s1 = peg$parsegeneric_func(); - if (s1 !== peg$FAILED) { - peg$savedPos = peg$currPos; - s2 = peg$c357(s1); - if (s2) { - s2 = void 0; - } else { - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - s3 = []; - s4 = peg$parsespace(); - while (s4 !== peg$FAILED) { - s3.push(s4); - s4 = peg$parsespace(); - } - if (s3 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c271(s1); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parseEJACOBI() { - var s0; - - var key = peg$currPos * 121 + 103, - cached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - if (input.substr(peg$currPos, 2) === peg$c358) { - s0 = peg$c358; - peg$currPos += 2; - } else { - s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c359); } - } - if (s0 === peg$FAILED) { - if (input.substr(peg$currPos, 2) === peg$c360) { - s0 = peg$c360; - peg$currPos += 2; - } else { - s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c361); } - } - if (s0 === peg$FAILED) { - if (input.substr(peg$currPos, 2) === peg$c362) { - s0 = peg$c362; - peg$currPos += 2; - } else { - s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c363); } - } - } - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parseDECLh() { - var s0, s1, s2, s3; - - var key = peg$currPos * 121 + 104, - cached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - s1 = peg$parsegeneric_func(); - if (s1 !== peg$FAILED) { - peg$savedPos = peg$currPos; - s2 = peg$c364(s1); - if (s2) { - s2 = void 0; - } else { - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - s3 = peg$parse_(); - if (s3 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c365(s1); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parseFUN_AR2nb() { - var s0, s1, s2, s3, s4; - - var key = peg$currPos * 121 + 105, - cached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - s1 = peg$parsegeneric_func(); - if (s1 !== peg$FAILED) { - peg$savedPos = peg$currPos; - s2 = peg$c366(s1); - if (s2) { - s2 = void 0; - } else { - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - s3 = []; - s4 = peg$parsespace(); - while (s4 !== peg$FAILED) { - s3.push(s4); - s4 = peg$parsespace(); - } - if (s3 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c271(s1); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parseLEFT() { - var s0, s1, s2, s3; - - var key = peg$currPos * 121 + 106, - cached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - s1 = peg$parsegeneric_func(); - if (s1 !== peg$FAILED) { - peg$savedPos = peg$currPos; - s2 = peg$c367(s1); - if (s2) { - s2 = void 0; - } else { - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - s3 = peg$parse_(); - if (s3 !== peg$FAILED) { - s1 = [s1, s2, s3]; - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parseRIGHT() { - var s0, s1, s2, s3; - - var key = peg$currPos * 121 + 107, - cached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - s1 = peg$parsegeneric_func(); - if (s1 !== peg$FAILED) { - peg$savedPos = peg$currPos; - s2 = peg$c368(s1); - if (s2) { - s2 = void 0; - } else { - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - s3 = peg$parse_(); - if (s3 !== peg$FAILED) { - s1 = [s1, s2, s3]; - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parseHLINE() { - var s0, s1, s2, s3; - - var key = peg$currPos * 121 + 108, - cached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - s1 = peg$parsegeneric_func(); - if (s1 !== peg$FAILED) { - peg$savedPos = peg$currPos; - s2 = peg$c369(s1); - if (s2) { - s2 = void 0; - } else { - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - s3 = peg$parse_(); - if (s3 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c271(s1); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parseCOLOR() { - var s0, s1, s2, s3, s4; - - var key = peg$currPos * 121 + 109, - cached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - s1 = peg$parsegeneric_func(); - if (s1 !== peg$FAILED) { - peg$savedPos = peg$currPos; - s2 = peg$c370(s1); - if (s2) { - s2 = void 0; - } else { - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - s3 = peg$parse_(); - if (s3 !== peg$FAILED) { - s4 = peg$parseCOLOR_SPEC(); - if (s4 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c371(s1, s4); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parseDEFINECOLOR() { - var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, s14, s15, s16, s17; - - var key = peg$currPos * 121 + 110, - cached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - s1 = peg$parsegeneric_func(); - if (s1 !== peg$FAILED) { - peg$savedPos = peg$currPos; - s2 = peg$c372(s1); - if (s2) { - s2 = void 0; - } else { - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - s3 = peg$parse_(); - if (s3 !== peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 123) { - s4 = peg$c35; - peg$currPos++; - } else { - s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c36); } - } - if (s4 !== peg$FAILED) { - s5 = peg$parse_(); - if (s5 !== peg$FAILED) { - s6 = []; - s7 = peg$parsealpha(); - if (s7 !== peg$FAILED) { - while (s7 !== peg$FAILED) { - s6.push(s7); - s7 = peg$parsealpha(); - } - } else { - s6 = peg$FAILED; - } - if (s6 !== peg$FAILED) { - s7 = peg$parse_(); - if (s7 !== peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 125) { - s8 = peg$c37; - peg$currPos++; - } else { - s8 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c38); } - } - if (s8 !== peg$FAILED) { - s9 = peg$parse_(); - if (s9 !== peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 123) { - s10 = peg$c35; - peg$currPos++; - } else { - s10 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c36); } - } - if (s10 !== peg$FAILED) { - s11 = peg$parse_(); - if (s11 !== peg$FAILED) { - s12 = peg$currPos; - if (input.substr(peg$currPos, 5).toLowerCase() === peg$c373) { - s13 = input.substr(peg$currPos, 5); - peg$currPos += 5; - } else { - s13 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c374); } - } - if (s13 !== peg$FAILED) { - s14 = peg$parse_(); - if (s14 !== peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 125) { - s15 = peg$c37; - peg$currPos++; - } else { - s15 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c38); } - } - if (s15 !== peg$FAILED) { - s16 = peg$parse_(); - if (s16 !== peg$FAILED) { - s17 = peg$parseCOLOR_SPEC_NAMED(); - if (s17 !== peg$FAILED) { - peg$savedPos = s12; - s13 = peg$c375(s1, s6, s17); - s12 = s13; - } else { - peg$currPos = s12; - s12 = peg$FAILED; - } - } else { - peg$currPos = s12; - s12 = peg$FAILED; - } - } else { - peg$currPos = s12; - s12 = peg$FAILED; - } - } else { - peg$currPos = s12; - s12 = peg$FAILED; - } - } else { - peg$currPos = s12; - s12 = peg$FAILED; - } - if (s12 === peg$FAILED) { - s12 = peg$currPos; - if (input.substr(peg$currPos, 4).toLowerCase() === peg$c376) { - s13 = input.substr(peg$currPos, 4); - peg$currPos += 4; - } else { - s13 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c377); } - } - if (s13 !== peg$FAILED) { - s14 = peg$parse_(); - if (s14 !== peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 125) { - s15 = peg$c37; - peg$currPos++; - } else { - s15 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c38); } - } - if (s15 !== peg$FAILED) { - s16 = peg$parse_(); - if (s16 !== peg$FAILED) { - s17 = peg$parseCOLOR_SPEC_GRAY(); - if (s17 !== peg$FAILED) { - peg$savedPos = s12; - s13 = peg$c378(s1, s6, s17); - s12 = s13; - } else { - peg$currPos = s12; - s12 = peg$FAILED; - } - } else { - peg$currPos = s12; - s12 = peg$FAILED; - } - } else { - peg$currPos = s12; - s12 = peg$FAILED; - } - } else { - peg$currPos = s12; - s12 = peg$FAILED; - } - } else { - peg$currPos = s12; - s12 = peg$FAILED; - } - if (s12 === peg$FAILED) { - s12 = peg$currPos; - if (input.substr(peg$currPos, 3) === peg$c379) { - s13 = peg$c379; - peg$currPos += 3; - } else { - s13 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c380); } - } - if (s13 !== peg$FAILED) { - s14 = peg$parse_(); - if (s14 !== peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 125) { - s15 = peg$c37; - peg$currPos++; - } else { - s15 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c38); } - } - if (s15 !== peg$FAILED) { - s16 = peg$parse_(); - if (s16 !== peg$FAILED) { - s17 = peg$parseCOLOR_SPEC_rgb(); - if (s17 !== peg$FAILED) { - peg$savedPos = s12; - s13 = peg$c381(s1, s6, s17); - s12 = s13; - } else { - peg$currPos = s12; - s12 = peg$FAILED; - } - } else { - peg$currPos = s12; - s12 = peg$FAILED; - } - } else { - peg$currPos = s12; - s12 = peg$FAILED; - } - } else { - peg$currPos = s12; - s12 = peg$FAILED; - } - } else { - peg$currPos = s12; - s12 = peg$FAILED; - } - if (s12 === peg$FAILED) { - s12 = peg$currPos; - if (input.substr(peg$currPos, 3) === peg$c382) { - s13 = peg$c382; - peg$currPos += 3; - } else { - s13 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c383); } - } - if (s13 !== peg$FAILED) { - s14 = peg$parse_(); - if (s14 !== peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 125) { - s15 = peg$c37; - peg$currPos++; - } else { - s15 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c38); } - } - if (s15 !== peg$FAILED) { - s16 = peg$parse_(); - if (s16 !== peg$FAILED) { - s17 = peg$parseCOLOR_SPEC_RGB(); - if (s17 !== peg$FAILED) { - peg$savedPos = s12; - s13 = peg$c381(s1, s6, s17); - s12 = s13; - } else { - peg$currPos = s12; - s12 = peg$FAILED; - } - } else { - peg$currPos = s12; - s12 = peg$FAILED; - } - } else { - peg$currPos = s12; - s12 = peg$FAILED; - } - } else { - peg$currPos = s12; - s12 = peg$FAILED; - } - } else { - peg$currPos = s12; - s12 = peg$FAILED; - } - if (s12 === peg$FAILED) { - s12 = peg$currPos; - if (input.substr(peg$currPos, 4).toLowerCase() === peg$c384) { - s13 = input.substr(peg$currPos, 4); - peg$currPos += 4; - } else { - s13 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c385); } - } - if (s13 !== peg$FAILED) { - s14 = peg$parse_(); - if (s14 !== peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 125) { - s15 = peg$c37; - peg$currPos++; - } else { - s15 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c38); } - } - if (s15 !== peg$FAILED) { - s16 = peg$parse_(); - if (s16 !== peg$FAILED) { - s17 = peg$parseCOLOR_SPEC_CMYK(); - if (s17 !== peg$FAILED) { - peg$savedPos = s12; - s13 = peg$c386(s1, s6, s17); - s12 = s13; - } else { - peg$currPos = s12; - s12 = peg$FAILED; - } - } else { - peg$currPos = s12; - s12 = peg$FAILED; - } - } else { - peg$currPos = s12; - s12 = peg$FAILED; - } - } else { - peg$currPos = s12; - s12 = peg$FAILED; - } - } else { - peg$currPos = s12; - s12 = peg$FAILED; - } - } - } - } - } - if (s12 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c387(s1, s6, s12); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parseCOLOR_SPEC() { - var s0, s1, s2, s3, s4, s5, s6, s7; - - var key = peg$currPos * 121 + 111, - cached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$parseCOLOR_SPEC_NAMED(); - if (s0 === peg$FAILED) { - s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 91) { - s1 = peg$c111; - peg$currPos++; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c112); } - } - if (s1 !== peg$FAILED) { - s2 = peg$parse_(); - if (s2 !== peg$FAILED) { - if (input.substr(peg$currPos, 5).toLowerCase() === peg$c373) { - s3 = input.substr(peg$currPos, 5); - peg$currPos += 5; - } else { - s3 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c374); } - } - if (s3 !== peg$FAILED) { - s4 = peg$parse_(); - if (s4 !== peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 93) { - s5 = peg$c113; - peg$currPos++; - } else { - s5 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c114); } - } - if (s5 !== peg$FAILED) { - s6 = peg$parse_(); - if (s6 !== peg$FAILED) { - s7 = peg$parseCOLOR_SPEC_NAMED(); - if (s7 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c388(s7); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 91) { - s1 = peg$c111; - peg$currPos++; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c112); } - } - if (s1 !== peg$FAILED) { - s2 = peg$parse_(); - if (s2 !== peg$FAILED) { - if (input.substr(peg$currPos, 4).toLowerCase() === peg$c376) { - s3 = input.substr(peg$currPos, 4); - peg$currPos += 4; - } else { - s3 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c377); } - } - if (s3 !== peg$FAILED) { - s4 = peg$parse_(); - if (s4 !== peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 93) { - s5 = peg$c113; - peg$currPos++; - } else { - s5 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c114); } - } - if (s5 !== peg$FAILED) { - s6 = peg$parse_(); - if (s6 !== peg$FAILED) { - s7 = peg$parseCOLOR_SPEC_GRAY(); - if (s7 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c389(s7); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 91) { - s1 = peg$c111; - peg$currPos++; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c112); } - } - if (s1 !== peg$FAILED) { - s2 = peg$parse_(); - if (s2 !== peg$FAILED) { - if (input.substr(peg$currPos, 3) === peg$c379) { - s3 = peg$c379; - peg$currPos += 3; - } else { - s3 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c380); } - } - if (s3 !== peg$FAILED) { - s4 = peg$parse_(); - if (s4 !== peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 93) { - s5 = peg$c113; - peg$currPos++; - } else { - s5 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c114); } - } - if (s5 !== peg$FAILED) { - s6 = peg$parse_(); - if (s6 !== peg$FAILED) { - s7 = peg$parseCOLOR_SPEC_rgb(); - if (s7 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c390(s7); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 91) { - s1 = peg$c111; - peg$currPos++; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c112); } - } - if (s1 !== peg$FAILED) { - s2 = peg$parse_(); - if (s2 !== peg$FAILED) { - if (input.substr(peg$currPos, 3) === peg$c382) { - s3 = peg$c382; - peg$currPos += 3; - } else { - s3 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c383); } - } - if (s3 !== peg$FAILED) { - s4 = peg$parse_(); - if (s4 !== peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 93) { - s5 = peg$c113; - peg$currPos++; - } else { - s5 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c114); } - } - if (s5 !== peg$FAILED) { - s6 = peg$parse_(); - if (s6 !== peg$FAILED) { - s7 = peg$parseCOLOR_SPEC_RGB(); - if (s7 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c390(s7); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 91) { - s1 = peg$c111; - peg$currPos++; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c112); } - } - if (s1 !== peg$FAILED) { - s2 = peg$parse_(); - if (s2 !== peg$FAILED) { - if (input.substr(peg$currPos, 4).toLowerCase() === peg$c384) { - s3 = input.substr(peg$currPos, 4); - peg$currPos += 4; - } else { - s3 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c385); } - } - if (s3 !== peg$FAILED) { - s4 = peg$parse_(); - if (s4 !== peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 93) { - s5 = peg$c113; - peg$currPos++; - } else { - s5 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c114); } - } - if (s5 !== peg$FAILED) { - s6 = peg$parse_(); - if (s6 !== peg$FAILED) { - s7 = peg$parseCOLOR_SPEC_CMYK(); - if (s7 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c391(s7); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } - } - } - } - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parseCOLOR_SPEC_NAMED() { - var s0, s1, s2, s3, s4, s5, s6; - - var key = peg$currPos * 121 + 112, - cached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 123) { - s1 = peg$c35; - peg$currPos++; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c36); } - } - if (s1 !== peg$FAILED) { - s2 = peg$parse_(); - if (s2 !== peg$FAILED) { - s3 = []; - s4 = peg$parsealpha(); - if (s4 !== peg$FAILED) { - while (s4 !== peg$FAILED) { - s3.push(s4); - s4 = peg$parsealpha(); - } - } else { - s3 = peg$FAILED; - } - if (s3 !== peg$FAILED) { - s4 = peg$parse_(); - if (s4 !== peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 125) { - s5 = peg$c37; - peg$currPos++; - } else { - s5 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c38); } - } - if (s5 !== peg$FAILED) { - s6 = peg$parse_(); - if (s6 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c392(s3); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parseCOLOR_SPEC_GRAY() { - var s0, s1, s2, s3, s4; - - var key = peg$currPos * 121 + 113, - cached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 123) { - s1 = peg$c35; - peg$currPos++; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c36); } - } - if (s1 !== peg$FAILED) { - s2 = peg$parse_(); - if (s2 !== peg$FAILED) { - s3 = []; - s4 = peg$parseCNUM(); - if (s4 !== peg$FAILED) { - while (s4 !== peg$FAILED) { - s3.push(s4); - s4 = peg$parseCNUM(); - } - } else { - s3 = peg$FAILED; - } - if (s3 !== peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 125) { - s4 = peg$c37; - peg$currPos++; - } else { - s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c38); } - } - if (s4 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c393(s3); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parseCOLOR_SPEC_rgb() { - var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11; - - var key = peg$currPos * 121 + 114, - cached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 123) { - s1 = peg$c35; - peg$currPos++; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c36); } - } - if (s1 !== peg$FAILED) { - s2 = peg$parse_(); - if (s2 !== peg$FAILED) { - s3 = peg$parseCNUM(); - if (s3 !== peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 44) { - s4 = peg$c72; - peg$currPos++; - } else { - s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c73); } - } - if (s4 !== peg$FAILED) { - s5 = peg$parse_(); - if (s5 !== peg$FAILED) { - s6 = peg$parseCNUM(); - if (s6 !== peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 44) { - s7 = peg$c72; - peg$currPos++; - } else { - s7 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c73); } - } - if (s7 !== peg$FAILED) { - s8 = peg$parse_(); - if (s8 !== peg$FAILED) { - s9 = peg$parseCNUM(); - if (s9 !== peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 125) { - s10 = peg$c37; - peg$currPos++; - } else { - s10 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c38); } - } - if (s10 !== peg$FAILED) { - s11 = peg$parse_(); - if (s11 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c394(s3, s6, s9); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parseCOLOR_SPEC_RGB() { - var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11; - - var key = peg$currPos * 121 + 115, - cached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 123) { - s1 = peg$c35; - peg$currPos++; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c36); } - } - if (s1 !== peg$FAILED) { - s2 = peg$parse_(); - if (s2 !== peg$FAILED) { - s3 = peg$parseCNUM255(); - if (s3 !== peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 44) { - s4 = peg$c72; - peg$currPos++; - } else { - s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c73); } - } - if (s4 !== peg$FAILED) { - s5 = peg$parse_(); - if (s5 !== peg$FAILED) { - s6 = peg$parseCNUM255(); - if (s6 !== peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 44) { - s7 = peg$c72; - peg$currPos++; - } else { - s7 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c73); } - } - if (s7 !== peg$FAILED) { - s8 = peg$parse_(); - if (s8 !== peg$FAILED) { - s9 = peg$parseCNUM255(); - if (s9 !== peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 125) { - s10 = peg$c37; - peg$currPos++; - } else { - s10 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c38); } - } - if (s10 !== peg$FAILED) { - s11 = peg$parse_(); - if (s11 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c394(s3, s6, s9); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parseCOLOR_SPEC_CMYK() { - var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, s14; - - var key = peg$currPos * 121 + 116, - cached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 123) { - s1 = peg$c35; - peg$currPos++; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c36); } - } - if (s1 !== peg$FAILED) { - s2 = peg$parse_(); - if (s2 !== peg$FAILED) { - s3 = peg$parseCNUM(); - if (s3 !== peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 44) { - s4 = peg$c72; - peg$currPos++; - } else { - s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c73); } - } - if (s4 !== peg$FAILED) { - s5 = peg$parse_(); - if (s5 !== peg$FAILED) { - s6 = peg$parseCNUM(); - if (s6 !== peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 44) { - s7 = peg$c72; - peg$currPos++; - } else { - s7 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c73); } - } - if (s7 !== peg$FAILED) { - s8 = peg$parse_(); - if (s8 !== peg$FAILED) { - s9 = peg$parseCNUM(); - if (s9 !== peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 44) { - s10 = peg$c72; - peg$currPos++; - } else { - s10 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c73); } - } - if (s10 !== peg$FAILED) { - s11 = peg$parse_(); - if (s11 !== peg$FAILED) { - s12 = peg$parseCNUM(); - if (s12 !== peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 125) { - s13 = peg$c37; - peg$currPos++; - } else { - s13 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c38); } - } - if (s13 !== peg$FAILED) { - s14 = peg$parse_(); - if (s14 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c395(s3, s6, s9, s12); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parseCNUM255() { - var s0, s1, s2, s3, s4, s5, s6; - - var key = peg$currPos * 121 + 117, - cached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - s1 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 48) { - s2 = peg$c396; - peg$currPos++; - } else { - s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c397); } - } - if (s2 === peg$FAILED) { - s2 = peg$currPos; - if (peg$c398.test(input.charAt(peg$currPos))) { - s3 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s3 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c399); } - } - if (s3 !== peg$FAILED) { - s4 = peg$currPos; - if (peg$c167.test(input.charAt(peg$currPos))) { - s5 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s5 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c168); } - } - if (s5 !== peg$FAILED) { - if (peg$c167.test(input.charAt(peg$currPos))) { - s6 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s6 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c168); } - } - if (s6 === peg$FAILED) { - s6 = null; - } - if (s6 !== peg$FAILED) { - s5 = [s5, s6]; - s4 = s5; - } else { - peg$currPos = s4; - s4 = peg$FAILED; - } - } else { - peg$currPos = s4; - s4 = peg$FAILED; - } - if (s4 === peg$FAILED) { - s4 = null; - } - if (s4 !== peg$FAILED) { - s3 = [s3, s4]; - s2 = s3; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - } - if (s2 !== peg$FAILED) { - s1 = input.substring(s1, peg$currPos); - } else { - s1 = s2; - } - if (s1 !== peg$FAILED) { - peg$savedPos = peg$currPos; - s2 = peg$c400(s1); - if (s2) { - s2 = void 0; - } else { - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - s3 = peg$parse_(); - if (s3 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c401(s1); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parseCNUM() { - var s0, s1, s2, s3, s4, s5, s6; - - var key = peg$currPos * 121 + 118, - cached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - s1 = peg$currPos; - s2 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 48) { - s3 = peg$c396; - peg$currPos++; - } else { - s3 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c397); } - } - if (s3 === peg$FAILED) { - s3 = null; - } - if (s3 !== peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 46) { - s4 = peg$c190; - peg$currPos++; - } else { - s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c191); } - } - if (s4 !== peg$FAILED) { - s5 = []; - if (peg$c167.test(input.charAt(peg$currPos))) { - s6 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s6 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c168); } - } - if (s6 !== peg$FAILED) { - while (s6 !== peg$FAILED) { - s5.push(s6); - if (peg$c167.test(input.charAt(peg$currPos))) { - s6 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s6 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c168); } - } - } - } else { - s5 = peg$FAILED; - } - if (s5 !== peg$FAILED) { - s3 = [s3, s4, s5]; - s2 = s3; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - s1 = input.substring(s1, peg$currPos); - } else { - s1 = s2; - } - if (s1 !== peg$FAILED) { - s2 = peg$parse_(); - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c402(s1); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$currPos; - s2 = peg$currPos; - if (peg$c403.test(input.charAt(peg$currPos))) { - s3 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s3 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c404); } - } - if (s3 !== peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 46) { - s4 = peg$c190; - peg$currPos++; - } else { - s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c191); } - } - if (s4 === peg$FAILED) { - s4 = null; - } - if (s4 !== peg$FAILED) { - s3 = [s3, s4]; - s2 = s3; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - s1 = input.substring(s1, peg$currPos); - } else { - s1 = s2; - } - if (s1 !== peg$FAILED) { - s2 = peg$parse_(); - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c402(s1); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parseimpossible() { - var s0; - - var key = peg$currPos * 121 + 119, - cached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - peg$savedPos = peg$currPos; - s0 = peg$c405(); - if (s0) { - s0 = void 0; - } else { - s0 = peg$FAILED; - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parseEOF() { - var s0; - - var key = peg$currPos * 121 + 120, - cached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - peg$savedPos = peg$currPos; - s0 = peg$c406(); - if (s0) { - s0 = void 0; - } else { - s0 = peg$FAILED; - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - - var ast = require('./ast'); - var tu = require('./texutil'); - - var sq_close_ri = ast.RenderT.HTMLABLEC(ast.FontClass.UFH(), "]", "]"); - - var lst2arr = function(l) { - var arr = []; - while (l !== null) { - arr.push(l.head); - l = l.tail; - } - return arr; - }; - - - peg$result = peg$startRuleFunction(); - - if (peg$result !== peg$FAILED && peg$currPos === input.length) { - return peg$result; - } else { - if (peg$result !== peg$FAILED && peg$currPos < input.length) { - peg$fail({ type: "end", description: "end of input" }); - } - - throw peg$buildException( - null, - peg$maxFailExpected, - peg$maxFailPos < input.length ? input.charAt(peg$maxFailPos) : null, - peg$maxFailPos < input.length ? - peg$computeLocation(peg$maxFailPos, peg$maxFailPos + 1) : - peg$computeLocation(peg$maxFailPos, peg$maxFailPos) - ); - } - } - - return { - SyntaxError: peg$SyntaxError, - parse: peg$parse - }; -})(); \ No newline at end of file From aca22ea36da862bb425207b81e15e0b8179d1077 Mon Sep 17 00:00:00 2001 From: Jagan Prem Date: Mon, 22 Aug 2016 11:08:54 -0400 Subject: [PATCH 03/10] Re-add parser.js --- .gitignore | 3 - lib/parser.js | 12885 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 12885 insertions(+), 3 deletions(-) create mode 100644 lib/parser.js diff --git a/.gitignore b/.gitignore index 73cc2a1..1d99c13 100644 --- a/.gitignore +++ b/.gitignore @@ -51,9 +51,6 @@ crashlytics-build.properties # Semantic Macros lib/optionalFunctions.csv -# Compiled pegJS code -lib/parser.js - # Node log lib/npm-debug.log diff --git a/lib/parser.js b/lib/parser.js new file mode 100644 index 0000000..721a7b0 --- /dev/null +++ b/lib/parser.js @@ -0,0 +1,12885 @@ +/* jshint latedef: false */ +module.exports = (function() { + "use strict"; + + /* + * Generated by PEG.js 0.9.0. + * + * http://pegjs.org/ + */ + + function peg$subclass(child, parent) { + /*jshint validthis:true, newcap:false*/ + function ctor() { this.constructor = child; } + ctor.prototype = parent.prototype; + child.prototype = new ctor(); + } + + function peg$SyntaxError(message, expected, found, location) { + /*jshint validthis:true, newcap:false*/ + this.message = message; + this.expected = expected; + this.found = found; + this.location = location; + this.name = "SyntaxError"; + + if (typeof Error.captureStackTrace === "function") { + Error.captureStackTrace(this, peg$SyntaxError); + } + } + + peg$subclass(peg$SyntaxError, Error); + + function peg$parse(input) { + /*jshint validthis:true, newcap:false*/ + var options = arguments.length > 1 ? arguments[1] : {}, + parser = this, + + peg$FAILED = {}, + + peg$startRuleFunctions = { start: peg$parsestart }, + peg$startRuleFunction = peg$parsestart, + + peg$c0 = function(t) { console.assert(t instanceof ast.LList); return t.toArray(); }, + peg$c1 = /^[ \t\n\r]/, + peg$c2 = { type: "class", value: "[ \\t\\n\\r]", description: "[ \\t\\n\\r]" }, + peg$c3 = "\\,", + peg$c4 = { type: "literal", value: "\\,", description: "\"\\\\,\"" }, + peg$c5 = "\\;", + peg$c6 = { type: "literal", value: "\\;", description: "\"\\\\;\"" }, + peg$c7 = "\\ ", + peg$c8 = { type: "literal", value: "\\ ", description: "\"\\\\ \"" }, + peg$c9 = "!", + peg$c10 = { type: "literal", value: "!", description: "\"!\"" }, + peg$c11 = "\\>", + peg$c12 = { type: "literal", value: "\\>", description: "\"\\\\>\"" }, + peg$c13 = "\\:", + peg$c14 = { type: "literal", value: "\\:", description: "\"\\\\:\"" }, + peg$c15 = "\\enspace", + peg$c16 = { type: "literal", value: "\\enspace", description: "\"\\\\enspace\"" }, + peg$c17 = "\\quad", + peg$c18 = { type: "literal", value: "\\quad", description: "\"\\\\quad\"" }, + peg$c19 = "\\qquad", + peg$c20 = { type: "literal", value: "\\qquad", description: "\"\\\\qquad\"" }, + peg$c21 = "\\thinspace", + peg$c22 = { type: "literal", value: "\\thinspace", description: "\"\\\\thinspace\"" }, + peg$c23 = "\\thinmuskip", + peg$c24 = { type: "literal", value: "\\thinmuskip", description: "\"\\\\thinmuskip\"" }, + peg$c25 = "\\medmuskip", + peg$c26 = { type: "literal", value: "\\medmuskip", description: "\"\\\\medmuskip\"" }, + peg$c27 = "\\thickmuskip", + peg$c28 = { type: "literal", value: "\\thickmuskip", description: "\"\\\\thickmuskip\"" }, + peg$c29 = "\\kern", + peg$c30 = { type: "literal", value: "\\kern", description: "\"\\\\kern\"" }, + peg$c31 = "\\hskip", + peg$c32 = { type: "literal", value: "\\hskip", description: "\"\\\\hskip\"" }, + peg$c33 = "\\hspace", + peg$c34 = { type: "literal", value: "\\hspace", description: "\"\\\\hspace\"" }, + peg$c35 = "{", + peg$c36 = { type: "literal", value: "{", description: "\"{\"" }, + peg$c37 = "}", + peg$c38 = { type: "literal", value: "}", description: "\"}\"" }, + peg$c39 = "~", + peg$c40 = { type: "literal", value: "~", description: "\"~\"" }, + peg$c41 = "\\hfill", + peg$c42 = { type: "literal", value: "\\hfill", description: "\"\\\\hfill\"" }, + peg$c43 = "\\hfil", + peg$c44 = { type: "literal", value: "\\hfil", description: "\"\\\\hfil\"" }, + peg$c45 = "\\hphantom", + peg$c46 = { type: "literal", value: "\\hphantom", description: "\"\\\\hphantom\"" }, + peg$c47 = function(e) { return e; }, + peg$c48 = function(e1, name, e2) { return ast.LList(ast.Tex.INFIX(name, e1.toArray(), e2.toArray())); }, + peg$c49 = function(e1, f, e2) { return ast.LList(ast.Tex.INFIXh(f[0], f[1], e1.toArray(), e2.toArray()));}, + peg$c50 = "", + peg$c51 = function() { return ast.LList.EMPTY; }, + peg$c52 = function(h, t) { return ast.LList(h, t); }, + peg$c53 = function(d, e) { return ast.LList(ast.Tex.DECLh(d[0], d[1], e.toArray())); }, + peg$c54 = function(l1, l2) { return ast.Tex.FQ(l1[0], l1[1], l2); }, + peg$c55 = function(l1, l2) { return ast.Tex.FQ(l1[0], l2, l1[1]); }, + peg$c56 = function(base, upi) { return ast.Tex.UQ(base, upi); }, + peg$c57 = function(base, downi) { return ast.Tex.DQ(base, downi); }, + peg$c58 = function() { return ast.Tex.LITERAL(sq_close_ri); }, + peg$c59 = function(l, e) { return ast.LList(l, e); }, + peg$c60 = function(l1, l2) { return ast.Tex.FQN(l1[0], l2); }, + peg$c61 = function(l) { return ast.Tex.UQN(l); }, + peg$c62 = function(l) { return ast.Tex.DQN(l); }, + peg$c63 = function(d) { return d; }, + peg$c64 = function() { return sq_close_ri; }, + peg$c65 = function(f, l) { return options.semanticlatex; }, + peg$c66 = function(f, l) { return ast.Tex.PAREN2(f, l); }, + peg$c67 = function(f, l) { return ast.Tex.PAREN1(f, l); }, + peg$c68 = "P_", + peg$c69 = { type: "literal", value: "P_", description: "\"P_\"" }, + peg$c70 = "^", + peg$c71 = { type: "literal", value: "^", description: "\"^\"" }, + peg$c72 = ",", + peg$c73 = { type: "literal", value: ",", description: "\",\"" }, + peg$c74 = function(l, l2, l3, l4) { return options.semanticlatex; }, + peg$c75 = function(l, l2, l3, l4) { return ast.Tex.JACOBI(l, l2, l3, l4); }, + peg$c76 = "L_", + peg$c77 = { type: "literal", value: "L_", description: "\"L_\"" }, + peg$c78 = function(l, l2, l3) { return options.semanticlatex; }, + peg$c79 = function(l, l2, l3) { return ast.Tex.LAGUERRE2(l, l2, l3); }, + peg$c80 = function(l, l2) { return options.semanticlatex; }, + peg$c81 = function(l, l2) { return ast.Tex.LAGUERRE1(l, l2); }, + peg$c82 = ";", + peg$c83 = { type: "literal", value: ";", description: "\";\"" }, + peg$c84 = "_", + peg$c85 = { type: "literal", value: "_", description: "\"_\"" }, + peg$c86 = function(l, l2, l3) { return ast.Tex.QPOCH(l, l2, l3); }, + peg$c87 = function(l1, l2) { return options.semanticlatex; }, + peg$c88 = function(l1, l2) { return ast.Tex.POCH(l1, l2); }, + peg$c89 = function(name, l) { return options.semanticlatex; }, + peg$c90 = function(name, l) { return ast.Tex.PAREN2(name, l); }, + peg$c91 = "\\rm", + peg$c92 = { type: "literal", value: "\\rm", description: "\"\\\\rm\"" }, + peg$c93 = function(e, l1, l2) { return options.semanticlatex; }, + peg$c94 = function(e, l1, l2) { return ast.Tex.EJACOBI(e, l1, l2); }, + peg$c95 = function(r) { return ast.Tex.LITERAL(r); }, + peg$c96 = function(f) { return tu.other_literals3[f]; }, + peg$c97 = function(f) { + var ast = peg$parse(tu.other_literals3[f]); + console.assert(Array.isArray(ast) && ast.length === 1); + return ast[0]; + }, + peg$c98 = function(b, r) { return ast.Tex.BIG(b, r); }, + peg$c99 = function(b) { return ast.Tex.BIG(b, sq_close_ri); }, + peg$c100 = function(l, e, r) { return ast.Tex.LR(l, r, e.toArray()); }, + peg$c101 = function(name, e, l) { return ast.Tex.FUN2sq(name, ast.Tex.CURLY(e.toArray()), l); }, + peg$c102 = function(name, l) { return ast.Tex.FUN1(name, l); }, + peg$c103 = function(name, l) { return ast.Tex.FUN1nb(name, l); }, + peg$c104 = function(name, l1, l2) { return ast.Tex.FUN2(name, l1, l2); }, + peg$c105 = function(name, l1, l2) { return ast.Tex.FUN2nb(name, l1, l2); }, + peg$c106 = function(name, l1, l2, l3) { return ast.Tex.FUN3(name, l1, l2, l3); }, + peg$c107 = function(f, l1, l2, l3, l4) { return options.semanticlatex; }, + peg$c108 = function(f, l1, l2, l3, l4) { return ast.Tex.JACOBI(l1, l2, l3, l4); }, + peg$c109 = function(f, l1, l2) { return options.semanticlatex; }, + peg$c110 = function(f, l1, l2) { return ast.Tex.LAGUERRE1(l1 ,l2); }, + peg$c111 = "[", + peg$c112 = { type: "literal", value: "[", description: "\"[\"" }, + peg$c113 = "]", + peg$c114 = { type: "literal", value: "]", description: "\"]\"" }, + peg$c115 = function(f, l1, l2, l3) { return options.semanticlatex; }, + peg$c116 = function(f, l1, l2, l3) { return ast.Tex.LAGUERRE2(l1, l2, l3); }, + peg$c117 = "\\Jacobi", + peg$c118 = { type: "literal", value: "\\Jacobi", description: "\"\\\\Jacobi\"" }, + peg$c119 = function(e) { return ast.Tex.CURLY(e.toArray()); }, + peg$c120 = function(e1, name, e2) { return ast.Tex.INFIX(name, e1.toArray(), e2.toArray()); }, + peg$c121 = function(e1, f, e2) { return ast.Tex.INFIXh(f[0], f[1], e1.toArray(), e2.toArray()); }, + peg$c122 = function(m) { return ast.Tex.MATRIX("matrix", lst2arr(m)); }, + peg$c123 = function(m) { return ast.Tex.MATRIX("pmatrix", lst2arr(m)); }, + peg$c124 = function(m) { return ast.Tex.MATRIX("bmatrix", lst2arr(m)); }, + peg$c125 = function(m) { return ast.Tex.MATRIX("Bmatrix", lst2arr(m)); }, + peg$c126 = function(m) { return ast.Tex.MATRIX("vmatrix", lst2arr(m)); }, + peg$c127 = function(m) { return ast.Tex.MATRIX("Vmatrix", lst2arr(m)); }, + peg$c128 = function(m) { return ast.Tex.MATRIX("array", lst2arr(m)); }, + peg$c129 = function(m) { return ast.Tex.MATRIX("aligned", lst2arr(m)); }, + peg$c130 = function(m) { return ast.Tex.MATRIX("alignedat", lst2arr(m)); }, + peg$c131 = function(m) { return ast.Tex.MATRIX("smallmatrix", lst2arr(m)); }, + peg$c132 = function(m) { return ast.Tex.MATRIX("cases", lst2arr(m)); }, + peg$c133 = function(m) { return ast.Tex.MULTLINE("multline", lst2arr(m)); }, + peg$c134 = function(m) { return ast.Tex.MULTLINE("multline*", lst2arr(m)); }, + peg$c135 = "\\begin{", + peg$c136 = { type: "literal", value: "\\begin{", description: "\"\\\\begin{\"" }, + peg$c137 = function() { throw new peg$SyntaxError("Illegal TeX function", [], text(), location()); }, + peg$c138 = function(f) { return !tu.all_functions[f]; }, + peg$c139 = function(f) { throw new peg$SyntaxError("Illegal TeX function", [], f, location()); }, + peg$c140 = function(f, l) { return ast.Tex.FUN1hl(f[0], f[1], l); }, + peg$c141 = function(f, l) { return ast.Tex.FUN1hf(f[0], f[1], l); }, + peg$c142 = function(f, l1, l2) { return ast.Tex.FUN2h(f[0], f[1], l1, l2); }, + peg$c143 = function(name, l1, l2, l3) { return options.semanticlatex; }, + peg$c144 = function(f) { throw new peg$SyntaxError("Illegal TeX function", [], text(), location()); }, + peg$c145 = function(l) { return ast.Tex.LITERAL(l); }, + peg$c146 = function(l) { return l; }, + peg$c147 = function(l) { return l;}, + peg$c148 = function(r) { + var c = 0; + var str = ""; + str = r.join(""); + while (c < r.join("").length) { //this code removes all the unneeded text and combines it together into one string. + if (str.indexOf("TEX_ONLY(\"") >= 0) { + str = str.replace("TEX_ONLY(\"", ""); + } + if (str.indexOf("\")") >= 0) { + str = str.replace("\")", ""); + } + c = c + 1; + } + return ast.Tex.LITERAL(ast.RenderT.TEX_ONLY(str)); }, + peg$c149 = function() { return ast.Tex.LITERAL(ast.RenderT.TEX_ONLY("")); }, + peg$c150 = function(cs, m) { m.head[0].unshift(cs); return m; }, + peg$c151 = function(as, m) { m.head[0].unshift(as); return m; }, + peg$c152 = function(l, m) { return m; }, + peg$c153 = function(l, tail) { return { head: lst2arr(l), tail: tail }; }, + peg$c154 = function(f, l) { l.head.unshift(ast.Tex.LITERAL(ast.RenderT.TEX_ONLY(f + " "))); return l;}, + peg$c155 = function(e, l) { return l; }, + peg$c156 = function(e, tail) { return { head: e.toArray(), tail: tail }; }, + peg$c157 = function(f, m) { m.head.unshift(ast.Tex.LITERAL(ast.RenderT.TEX_ONLY(f + " "))); return m; }, + peg$c158 = function(e) { return { head: e.toArray(), tail: null }; }, + peg$c159 = function() { return text(); }, + peg$c160 = function(cs) { return ast.Tex.CURLY([ast.Tex.LITERAL(ast.RenderT.TEX_ONLY(cs))]); }, + peg$c161 = /^[lrc]/, + peg$c162 = { type: "class", value: "[lrc]", description: "[lrc]" }, + peg$c163 = "p", + peg$c164 = { type: "literal", value: "p", description: "\"p\"" }, + peg$c165 = "*", + peg$c166 = { type: "literal", value: "*", description: "\"*\"" }, + peg$c167 = /^[0-9]/, + peg$c168 = { type: "class", value: "[0-9]", description: "[0-9]" }, + peg$c169 = "||", + peg$c170 = { type: "literal", value: "||", description: "\"||\"" }, + peg$c171 = "|", + peg$c172 = { type: "literal", value: "|", description: "\"|\"" }, + peg$c173 = "@", + peg$c174 = { type: "literal", value: "@", description: "\"@\"" }, + peg$c175 = function(num) { return ast.Tex.CURLY([ast.Tex.LITERAL(ast.RenderT.TEX_ONLY(num))]); }, + peg$c176 = /^[tcb]/, + peg$c177 = { type: "class", value: "[tcb]", description: "[tcb]" }, + peg$c178 = /^[a-zA-Z]/, + peg$c179 = { type: "class", value: "[a-zA-Z]", description: "[a-zA-Z]" }, + peg$c180 = /^[,:;?!']/, + peg$c181 = { type: "class", value: "[,:;?!\\']", description: "[,:;?!\\']" }, + peg$c182 = /^[().]/, + peg$c183 = { type: "class", value: "[().]", description: "[().]" }, + peg$c184 = /^[\-+*=]/, + peg$c185 = { type: "class", value: "[-+*=]", description: "[-+*=]" }, + peg$c186 = /^[\/|]/, + peg$c187 = { type: "class", value: "[\\/|]", description: "[\\/|]" }, + peg$c188 = "-", + peg$c189 = { type: "literal", value: "-", description: "\"-\"" }, + peg$c190 = ".", + peg$c191 = { type: "literal", value: ".", description: "\".\"" }, + peg$c192 = "pt", + peg$c193 = { type: "literal", value: "pt", description: "\"pt\"" }, + peg$c194 = "pc", + peg$c195 = { type: "literal", value: "pc", description: "\"pc\"" }, + peg$c196 = "in", + peg$c197 = { type: "literal", value: "in", description: "\"in\"" }, + peg$c198 = "cm", + peg$c199 = { type: "literal", value: "cm", description: "\"cm\"" }, + peg$c200 = "bp", + peg$c201 = { type: "literal", value: "bp", description: "\"bp\"" }, + peg$c202 = "mm", + peg$c203 = { type: "literal", value: "mm", description: "\"mm\"" }, + peg$c204 = "dd", + peg$c205 = { type: "literal", value: "dd", description: "\"dd\"" }, + peg$c206 = "cc", + peg$c207 = { type: "literal", value: "cc", description: "\"cc\"" }, + peg$c208 = "sp", + peg$c209 = { type: "literal", value: "sp", description: "\"sp\"" }, + peg$c210 = "ex", + peg$c211 = { type: "literal", value: "ex", description: "\"ex\"" }, + peg$c212 = "em", + peg$c213 = { type: "literal", value: "em", description: "\"em\"" }, + peg$c214 = "mu", + peg$c215 = { type: "literal", value: "mu", description: "\"mu\"" }, + peg$c216 = "px", + peg$c217 = { type: "literal", value: "px", description: "\"px\"" }, + peg$c218 = /^[@]/, + peg$c219 = { type: "class", value: "[@]", description: "[@]" }, + peg$c220 = /^[\-0-9a-zA-Z+*,=():\/;?.!'` \x80-\uD7FF\uE000-\uFFFF]/, + peg$c221 = { type: "class", value: "[-0-9a-zA-Z+*,=():\\/;?.!\\'` \\x80-\\ud7ff\\ue000-\\uffff]", description: "[-0-9a-zA-Z+*,=():\\/;?.!\\'` \\x80-\\ud7ff\\ue000-\\uffff]" }, + peg$c222 = /^[\uD800-\uDBFF]/, + peg$c223 = { type: "class", value: "[\\ud800-\\udbff]", description: "[\\ud800-\\udbff]" }, + peg$c224 = /^[\uDC00-\uDFFF]/, + peg$c225 = { type: "class", value: "[\\udc00-\\udfff]", description: "[\\udc00-\\udfff]" }, + peg$c226 = function(l, h) { return text(); }, + peg$c227 = function(b) { return tu.box_functions[b]; }, + peg$c228 = function(b, cs) { return ast.Tex.BOX(b, cs.join('')); }, + peg$c229 = function(c) { return ast.RenderT.TEX_ONLY(c); }, + peg$c230 = function(f) { return tu.latex_function_names[f]; }, + peg$c231 = "(", + peg$c232 = { type: "literal", value: "(", description: "\"(\"" }, + peg$c233 = "\\{", + peg$c234 = { type: "literal", value: "\\{", description: "\"\\\\{\"" }, + peg$c235 = function(f) { return " ";}, + peg$c236 = function(f, c) { return ast.RenderT.TEX_ONLY(f + c); }, + peg$c237 = function(f) { return tu.mediawiki_function_names[f]; }, + peg$c238 = function(f) { return "";}, + peg$c239 = function(f, c) { return ast.RenderT.TEX_ONLY("\\operatorname{" + f.slice(1) + "}" + c); }, + peg$c240 = function(f) { return tu.other_literals1[f]; }, + peg$c241 = function(f) { return ast.RenderT.TEX_ONLY(f + " "); }, + peg$c242 = function(f) { return options.usemathrm && tu.other_literals2[f]; }, + peg$c243 = function(f) { return ast.RenderT.TEX_ONLY("\\mathrm{" + f + "} "); }, + peg$c244 = function(mathrm) { return options.usemathrm && mathrm === "\\mathrm"; }, + peg$c245 = function(mathrm, f) { return options.usemathrm && tu.other_literals2[f]; }, + peg$c246 = function(mathrm, f) { return options.usemathrm && ast.RenderT.TEX_ONLY("\\mathrm{" + f + "} "); }, + peg$c247 = function(f) { return tu.other_literals2[f]; }, + peg$c248 = function(f) { return ast.RenderT.TEX_ONLY("\\mbox{" + f + "} "); }, + peg$c249 = function(mbox) { return mbox === "\\mbox"; }, + peg$c250 = function(mbox, f) { return tu.other_literals2[f]; }, + peg$c251 = function(mbox, f) { return ast.RenderT.TEX_ONLY("\\mbox{" + f + "} "); }, + peg$c252 = function(f) { return ast.RenderT.TEX_ONLY(f); }, + peg$c253 = "\\", + peg$c254 = { type: "literal", value: "\\", description: "\"\\\\\"" }, + peg$c255 = /^[, ;!_#%$&]/, + peg$c256 = { type: "class", value: "[, ;!_#%$&]", description: "[, ;!_#%$&]" }, + peg$c257 = function(c) { return ast.RenderT.TEX_ONLY("\\" + c); }, + peg$c258 = /^[><~]/, + peg$c259 = { type: "class", value: "[><~]", description: "[><~]" }, + peg$c260 = /^[%$]/, + peg$c261 = { type: "class", value: "[%$]", description: "[%$]" }, + peg$c262 = function(c) { return ast.RenderT.TEX_ONLY("\\" + c); /* escape dangerous chars */}, + peg$c263 = function(f) { return ast.RenderT.TEX_ONLY(tu.other_literals3[f] + " "); }, + peg$c264 = /^[{}|]/, + peg$c265 = { type: "class", value: "[{}|]", description: "[{}|]" }, + peg$c266 = function(f) { return tu.other_delimiters1[f]; }, + peg$c267 = function(f) { return tu.other_delimiters2[f]; }, + peg$c268 = function(f) { var p = peg$parse(tu.other_delimiters2[f]); + console.assert(Array.isArray(p) && p.length === 1); + console.assert(p[0].constructor === ast.Tex.LITERAL); + console.assert(p[0][0].constructor === ast.RenderT.TEX_ONLY); + return p[0][0]; + }, + peg$c269 = function(c) { return ast.RenderT.TEX_ONLY(""); }, + peg$c270 = function(f) { return tu.fun_ar1nb[f]; }, + peg$c271 = function(f) { return f; }, + peg$c272 = function(f) { return tu.fun_ar1opt[f]; }, + peg$c273 = "&", + peg$c274 = { type: "literal", value: "&", description: "\"&\"" }, + peg$c275 = "\\\\", + peg$c276 = { type: "literal", value: "\\\\", description: "\"\\\\\\\\\"" }, + peg$c277 = "\\begin", + peg$c278 = { type: "literal", value: "\\begin", description: "\"\\\\begin\"" }, + peg$c279 = "\\end", + peg$c280 = { type: "literal", value: "\\end", description: "\"\\\\end\"" }, + peg$c281 = "{matrix}", + peg$c282 = { type: "literal", value: "{matrix}", description: "\"{matrix}\"" }, + peg$c283 = "{pmatrix}", + peg$c284 = { type: "literal", value: "{pmatrix}", description: "\"{pmatrix}\"" }, + peg$c285 = "{bmatrix}", + peg$c286 = { type: "literal", value: "{bmatrix}", description: "\"{bmatrix}\"" }, + peg$c287 = "{Bmatrix}", + peg$c288 = { type: "literal", value: "{Bmatrix}", description: "\"{Bmatrix}\"" }, + peg$c289 = "{vmatrix}", + peg$c290 = { type: "literal", value: "{vmatrix}", description: "\"{vmatrix}\"" }, + peg$c291 = "{Vmatrix}", + peg$c292 = { type: "literal", value: "{Vmatrix}", description: "\"{Vmatrix}\"" }, + peg$c293 = "{array}", + peg$c294 = { type: "literal", value: "{array}", description: "\"{array}\"" }, + peg$c295 = "{align}", + peg$c296 = { type: "literal", value: "{align}", description: "\"{align}\"" }, + peg$c297 = "{aligned}", + peg$c298 = { type: "literal", value: "{aligned}", description: "\"{aligned}\"" }, + peg$c299 = "{alignat}", + peg$c300 = { type: "literal", value: "{alignat}", description: "\"{alignat}\"" }, + peg$c301 = "{alignedat}", + peg$c302 = { type: "literal", value: "{alignedat}", description: "\"{alignedat}\"" }, + peg$c303 = "{smallmatrix}", + peg$c304 = { type: "literal", value: "{smallmatrix}", description: "\"{smallmatrix}\"" }, + peg$c305 = "{cases}", + peg$c306 = { type: "literal", value: "{cases}", description: "\"{cases}\"" }, + peg$c307 = "{multline}", + peg$c308 = { type: "literal", value: "{multline}", description: "\"{multline}\"" }, + peg$c309 = "{multline*}", + peg$c310 = { type: "literal", value: "{multline*}", description: "\"{multline*}\"" }, + peg$c311 = "\\big(", + peg$c312 = { type: "literal", value: "\\big(", description: "\"\\\\big(\"" }, + peg$c313 = "\\Big(", + peg$c314 = { type: "literal", value: "\\Big(", description: "\"\\\\Big(\"" }, + peg$c315 = "\\bigg(", + peg$c316 = { type: "literal", value: "\\bigg(", description: "\"\\\\bigg(\"" }, + peg$c317 = "\\Bigg(", + peg$c318 = { type: "literal", value: "\\Bigg(", description: "\"\\\\Bigg(\"" }, + peg$c319 = "\\bigl(", + peg$c320 = { type: "literal", value: "\\bigl(", description: "\"\\\\bigl(\"" }, + peg$c321 = "\\Bigl(", + peg$c322 = { type: "literal", value: "\\Bigl(", description: "\"\\\\Bigl(\"" }, + peg$c323 = "\\bigg1(", + peg$c324 = { type: "literal", value: "\\bigg1(", description: "\"\\\\bigg1(\"" }, + peg$c325 = "\\Biggl(", + peg$c326 = { type: "literal", value: "\\Biggl(", description: "\"\\\\Biggl(\"" }, + peg$c327 = "\\left(", + peg$c328 = { type: "literal", value: "\\left(", description: "\"\\\\left(\"" }, + peg$c329 = ")", + peg$c330 = { type: "literal", value: ")", description: "\")\"" }, + peg$c331 = "\\big)", + peg$c332 = { type: "literal", value: "\\big)", description: "\"\\\\big)\"" }, + peg$c333 = "\\Big)", + peg$c334 = { type: "literal", value: "\\Big)", description: "\"\\\\Big)\"" }, + peg$c335 = "\\bigg)", + peg$c336 = { type: "literal", value: "\\bigg)", description: "\"\\\\bigg)\"" }, + peg$c337 = "\\Bigg)", + peg$c338 = { type: "literal", value: "\\Bigg)", description: "\"\\\\Bigg)\"" }, + peg$c339 = "\\bigr)", + peg$c340 = { type: "literal", value: "\\bigr)", description: "\"\\\\bigr)\"" }, + peg$c341 = "\\Bigr)", + peg$c342 = { type: "literal", value: "\\Bigr)", description: "\"\\\\Bigr)\"" }, + peg$c343 = "\\biggr)", + peg$c344 = { type: "literal", value: "\\biggr)", description: "\"\\\\biggr)\"" }, + peg$c345 = "\\Biggr)", + peg$c346 = { type: "literal", value: "\\Biggr)", description: "\"\\\\Biggr)\"" }, + peg$c347 = "\\right)", + peg$c348 = { type: "literal", value: "\\right)", description: "\"\\\\right)\"" }, + peg$c349 = function(f) { return tu.big_literals[f]; }, + peg$c350 = function(f) { return tu.paren[f]; }, + peg$c351 = function(f) { return tu.fun_ar1[f]; }, + peg$c352 = function(f) { return tu.other_fun_ar1[f]; }, + peg$c353 = function(f) { return tu.fun_ar2[f]; }, + peg$c354 = function(f) { return tu.fun_ar3[f]; }, + peg$c355 = function(f) { return tu.fun_infix[f]; }, + peg$c356 = function(f) { return tu.jacobi[f]; }, + peg$c357 = function(f) { return tu.laguerre[f]; }, + peg$c358 = "sn", + peg$c359 = { type: "literal", value: "sn", description: "\"sn\"" }, + peg$c360 = "cn", + peg$c361 = { type: "literal", value: "cn", description: "\"cn\"" }, + peg$c362 = "dn", + peg$c363 = { type: "literal", value: "dn", description: "\"dn\"" }, + peg$c364 = function(f) { return tu.declh_function[f]; }, + peg$c365 = function(f) { return ast.Tex.DECLh(f, ast.FontForce.RM(), []); /*see bug 54818*/ }, + peg$c366 = function(f) { return tu.fun_ar2nb[f]; }, + peg$c367 = function(f) { return tu.left_function[f]; }, + peg$c368 = function(f) { return tu.right_function[f]; }, + peg$c369 = function(f) { return tu.hline_function[f]; }, + peg$c370 = function(f) { return tu.color_function[f]; }, + peg$c371 = function(f, cs) { return f + cs; }, + peg$c372 = function(f) { return tu.definecolor_function[f]; }, + peg$c373 = "named", + peg$c374 = { type: "literal", value: "named", description: "\"named\"" }, + peg$c375 = function(f, name, cs) { return "{named}" + cs; }, + peg$c376 = "gray", + peg$c377 = { type: "literal", value: "gray", description: "\"gray\"" }, + peg$c378 = function(f, name, cs) { return "{gray}" + cs; }, + peg$c379 = "rgb", + peg$c380 = { type: "literal", value: "rgb", description: "\"rgb\"" }, + peg$c381 = function(f, name, cs) { return "{rgb}" + cs; }, + peg$c382 = "RGB", + peg$c383 = { type: "literal", value: "RGB", description: "\"RGB\"" }, + peg$c384 = "cmyk", + peg$c385 = { type: "literal", value: "cmyk", description: "\"cmyk\"" }, + peg$c386 = function(f, name, cs) { return "{cmyk}" + cs; }, + peg$c387 = function(f, name, a) { return f + "{" + name.join('') + "}" + a; }, + peg$c388 = function(cs) { return "[named]" + cs; }, + peg$c389 = function(cs) { return "[gray]" + cs; }, + peg$c390 = function(cs) { return "[rgb]" + cs; }, + peg$c391 = function(cs) { return "[cmyk]" + cs; }, + peg$c392 = function(name) { return "{" + name.join('') + "}"; }, + peg$c393 = function(k) { return "{"+k+"}"; }, + peg$c394 = function(r, g, b) { return "{"+r+","+g+","+b+"}"; }, + peg$c395 = function(c, m, y, k) { return "{"+c+","+m+","+y+","+k+"}"; }, + peg$c396 = "0", + peg$c397 = { type: "literal", value: "0", description: "\"0\"" }, + peg$c398 = /^[1-9]/, + peg$c399 = { type: "class", value: "[1-9]", description: "[1-9]" }, + peg$c400 = function(n) { return parseInt(n, 10) <= 255; }, + peg$c401 = function(n) { return n / 255; }, + peg$c402 = function(n) { return n; }, + peg$c403 = /^[01]/, + peg$c404 = { type: "class", value: "[01]", description: "[01]" }, + peg$c405 = function() { return false; }, + peg$c406 = function() { return peg$currPos === input.length; }, + + peg$currPos = 0, + peg$savedPos = 0, + peg$posDetailsCache = [{ line: 1, column: 1, seenCR: false }], + peg$maxFailPos = 0, + peg$maxFailExpected = [], + peg$silentFails = 0, + + peg$resultsCache = {}, + + peg$result; + + if ("startRule" in options) { + if (!(options.startRule in peg$startRuleFunctions)) { + throw new Error("Can't start parsing from rule \"" + options.startRule + "\"."); + } + + peg$startRuleFunction = peg$startRuleFunctions[options.startRule]; + } + + function text() { + return input.substring(peg$savedPos, peg$currPos); + } + + function location() { + return peg$computeLocation(peg$savedPos, peg$currPos); + } + + function expected(description) { + throw peg$buildException( + null, + [{ type: "other", description: description }], + input.substring(peg$savedPos, peg$currPos), + peg$computeLocation(peg$savedPos, peg$currPos) + ); + } + + function error(message) { + throw peg$buildException( + message, + null, + input.substring(peg$savedPos, peg$currPos), + peg$computeLocation(peg$savedPos, peg$currPos) + ); + } + + function peg$computePosDetails(pos) { + var details = peg$posDetailsCache[pos], + p, ch; + + if (details) { + return details; + } else { + p = pos - 1; + while (!peg$posDetailsCache[p]) { + p--; + } + + details = peg$posDetailsCache[p]; + details = { + line: details.line, + column: details.column, + seenCR: details.seenCR + }; + + while (p < pos) { + 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; + } + + p++; + } + + peg$posDetailsCache[pos] = details; + return details; + } + } + + function peg$computeLocation(startPos, endPos) { + var startPosDetails = peg$computePosDetails(startPos), + endPosDetails = peg$computePosDetails(endPos); + + return { + start: { + offset: startPos, + line: startPosDetails.line, + column: startPosDetails.column + }, + end: { + offset: endPos, + line: endPosDetails.line, + column: endPosDetails.column + } + }; + } + + function peg$fail(expected) { + if (peg$currPos < peg$maxFailPos) { return; } + + if (peg$currPos > peg$maxFailPos) { + peg$maxFailPos = peg$currPos; + peg$maxFailExpected = []; + } + + peg$maxFailExpected.push(expected); + } + + function peg$buildException(message, expected, found, location) { + function cleanupExpected(expected) { + var i = 1; + + expected.sort(function(a, b) { + if (a.description < b.description) { + return -1; + } else if (a.description > b.description) { + return 1; + } else { + return 0; + } + }); + + while (i < expected.length) { + if (expected[i - 1] === expected[i]) { + expected.splice(i, 1); + } else { + i++; + } + } + } + + 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(/[\u0100-\u0FFF]/g, function(ch) { return '\\u0' + hex(ch); }) + .replace(/[\u1000-\uFFFF]/g, function(ch) { return '\\u' + hex(ch); }); + } + + var expectedDescs = new Array(expected.length), + expectedDesc, foundDesc, i; + + for (i = 0; i < expected.length; i++) { + expectedDescs[i] = expected[i].description; + } + + expectedDesc = expected.length > 1 ? + expectedDescs.slice(0, -1).join(", ") + + " or " + + expectedDescs[expected.length - 1] : + expectedDescs[0]; + + foundDesc = found ? "\"" + stringEscape(found) + "\"" : "end of input"; + + return "Expected " + expectedDesc + " but " + foundDesc + " found."; + } + + if (expected !== null) { + cleanupExpected(expected); + } + + return new peg$SyntaxError( + message !== null ? message : buildMessage(expected, found), + expected, + found, + location + ); + } + + function peg$parsestart() { + var s0, s1, s2; + + var key = peg$currPos * 121 + 0, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + s0 = peg$currPos; + s1 = peg$parse_(); + if (s1 !== peg$FAILED) { + s2 = peg$parsetex_expr(); + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c0(s2); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + function peg$parse_() { + var s0, s1; + + var key = peg$currPos * 121 + 1, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + s0 = []; + if (peg$c1.test(input.charAt(peg$currPos))) { + s1 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c2); } + } + while (s1 !== peg$FAILED) { + s0.push(s1); + if (peg$c1.test(input.charAt(peg$currPos))) { + s1 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c2); } + } + } + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + function peg$parsespace() { + var s0, s1, s2, s3, s4, s5, s6, s7, s8; + + var key = peg$currPos * 121 + 2, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + if (input.substr(peg$currPos, 2) === peg$c3) { + s0 = peg$c3; + peg$currPos += 2; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c4); } + } + if (s0 === peg$FAILED) { + if (input.substr(peg$currPos, 2) === peg$c5) { + s0 = peg$c5; + peg$currPos += 2; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c6); } + } + if (s0 === peg$FAILED) { + if (input.substr(peg$currPos, 2) === peg$c7) { + s0 = peg$c7; + peg$currPos += 2; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c8); } + } + if (s0 === peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 33) { + s0 = peg$c9; + peg$currPos++; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c10); } + } + if (s0 === peg$FAILED) { + if (input.substr(peg$currPos, 2) === peg$c11) { + s0 = peg$c11; + peg$currPos += 2; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c12); } + } + if (s0 === peg$FAILED) { + if (input.substr(peg$currPos, 2) === peg$c13) { + s0 = peg$c13; + peg$currPos += 2; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c14); } + } + if (s0 === peg$FAILED) { + if (input.substr(peg$currPos, 8) === peg$c15) { + s0 = peg$c15; + peg$currPos += 8; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c16); } + } + if (s0 === peg$FAILED) { + if (input.substr(peg$currPos, 5) === peg$c17) { + s0 = peg$c17; + peg$currPos += 5; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c18); } + } + if (s0 === peg$FAILED) { + if (input.substr(peg$currPos, 6) === peg$c19) { + s0 = peg$c19; + peg$currPos += 6; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c20); } + } + if (s0 === peg$FAILED) { + if (input.substr(peg$currPos, 10) === peg$c21) { + s0 = peg$c21; + peg$currPos += 10; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c22); } + } + if (s0 === peg$FAILED) { + if (input.substr(peg$currPos, 11) === peg$c23) { + s0 = peg$c23; + peg$currPos += 11; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c24); } + } + if (s0 === peg$FAILED) { + if (input.substr(peg$currPos, 10) === peg$c25) { + s0 = peg$c25; + peg$currPos += 10; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c26); } + } + if (s0 === peg$FAILED) { + if (input.substr(peg$currPos, 12) === peg$c27) { + s0 = peg$c27; + peg$currPos += 12; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c28); } + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.substr(peg$currPos, 5) === peg$c29) { + s1 = peg$c29; + peg$currPos += 5; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c30); } + } + if (s1 !== peg$FAILED) { + s2 = peg$parse_(); + if (s2 !== peg$FAILED) { + s3 = peg$parsenum(); + if (s3 !== peg$FAILED) { + s4 = peg$parse_(); + if (s4 !== peg$FAILED) { + s1 = [s1, s2, s3, s4]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.substr(peg$currPos, 6) === peg$c31) { + s1 = peg$c31; + peg$currPos += 6; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c32); } + } + if (s1 !== peg$FAILED) { + s2 = peg$parse_(); + if (s2 !== peg$FAILED) { + s3 = peg$parsenum(); + if (s3 !== peg$FAILED) { + s4 = peg$parse_(); + if (s4 !== peg$FAILED) { + s1 = [s1, s2, s3, s4]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.substr(peg$currPos, 7) === peg$c33) { + s1 = peg$c33; + peg$currPos += 7; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c34); } + } + if (s1 !== peg$FAILED) { + s2 = peg$parse_(); + if (s2 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 123) { + s3 = peg$c35; + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c36); } + } + if (s3 !== peg$FAILED) { + s4 = peg$parse_(); + if (s4 !== peg$FAILED) { + s5 = peg$parsenum(); + if (s5 !== peg$FAILED) { + s6 = peg$parse_(); + if (s6 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 125) { + s7 = peg$c37; + peg$currPos++; + } else { + s7 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c38); } + } + if (s7 !== peg$FAILED) { + s8 = peg$parse_(); + if (s8 !== peg$FAILED) { + s1 = [s1, s2, s3, s4, s5, s6, s7, s8]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 126) { + s0 = peg$c39; + peg$currPos++; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c40); } + } + if (s0 === peg$FAILED) { + if (input.substr(peg$currPos, 2) === peg$c7) { + s0 = peg$c7; + peg$currPos += 2; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c8); } + } + if (s0 === peg$FAILED) { + if (input.substr(peg$currPos, 6) === peg$c41) { + s0 = peg$c41; + peg$currPos += 6; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c42); } + } + if (s0 === peg$FAILED) { + if (input.substr(peg$currPos, 5) === peg$c43) { + s0 = peg$c43; + peg$currPos += 5; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c44); } + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.substr(peg$currPos, 9) === peg$c45) { + s1 = peg$c45; + peg$currPos += 9; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c46); } + } + if (s1 !== peg$FAILED) { + s2 = peg$parse_(); + if (s2 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 123) { + s3 = peg$c35; + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c36); } + } + if (s3 !== peg$FAILED) { + s4 = peg$parse_(); + if (s4 !== peg$FAILED) { + s5 = peg$parselit(); + if (s5 !== peg$FAILED) { + s6 = peg$parse_(); + if (s6 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 125) { + s7 = peg$c37; + peg$currPos++; + } else { + s7 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c38); } + } + if (s7 !== peg$FAILED) { + s8 = peg$parse_(); + if (s8 !== peg$FAILED) { + s1 = [s1, s2, s3, s4, s5, s6, s7, s8]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + if (peg$c1.test(input.charAt(peg$currPos))) { + s0 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c2); } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + function peg$parsetex_expr() { + var s0, s1, s2, s3, s4; + + var key = peg$currPos * 121 + 3, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + s0 = peg$currPos; + s1 = peg$parseexpr(); + if (s1 !== peg$FAILED) { + s2 = peg$parseEOF(); + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c47(s1); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parsene_expr(); + if (s1 !== peg$FAILED) { + s2 = peg$parseFUN_INFIX(); + if (s2 !== peg$FAILED) { + s3 = peg$parsene_expr(); + if (s3 !== peg$FAILED) { + s4 = peg$parseEOF(); + if (s4 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c48(s1, s2, s3); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parsene_expr(); + if (s1 !== peg$FAILED) { + s2 = peg$parseimpossible(); + if (s2 !== peg$FAILED) { + s3 = peg$parsene_expr(); + if (s3 !== peg$FAILED) { + s4 = peg$parseEOF(); + if (s4 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c49(s1, s2, s3); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + } + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + function peg$parseexpr() { + var s0, s1; + + var key = peg$currPos * 121 + 4, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + s0 = peg$parsene_expr(); + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$c50; + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c51(); + } + s0 = s1; + } + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + function peg$parsene_expr() { + var s0, s1, s2; + + var key = peg$currPos * 121 + 5, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + s0 = peg$currPos; + s1 = peg$parselit_aq(); + if (s1 !== peg$FAILED) { + s2 = peg$parseexpr(); + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c52(s1, s2); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parselitsq_aq(); + if (s1 !== peg$FAILED) { + s2 = peg$parseexpr(); + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c52(s1, s2); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseDECLh(); + if (s1 !== peg$FAILED) { + s2 = peg$parseexpr(); + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c53(s1, s2); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + } + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + function peg$parselitsq_aq() { + var s0; + + var key = peg$currPos * 121 + 6, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + s0 = peg$parselitsq_fq(); + if (s0 === peg$FAILED) { + s0 = peg$parselitsq_dq(); + if (s0 === peg$FAILED) { + s0 = peg$parselitsq_uq(); + if (s0 === peg$FAILED) { + s0 = peg$parselitsq_zq(); + } + } + } + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + function peg$parselitsq_fq() { + var s0, s1, s2, s3; + + var key = peg$currPos * 121 + 7, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + s0 = peg$currPos; + s1 = peg$parselitsq_dq(); + if (s1 !== peg$FAILED) { + s2 = peg$parseSUP(); + if (s2 !== peg$FAILED) { + s3 = peg$parselit(); + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c54(s1, s3); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parselitsq_uq(); + if (s1 !== peg$FAILED) { + s2 = peg$parseSUB(); + if (s2 !== peg$FAILED) { + s3 = peg$parselit(); + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c55(s1, s3); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + function peg$parselitsq_uq() { + var s0, s1, s2, s3; + + var key = peg$currPos * 121 + 8, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + s0 = peg$currPos; + s1 = peg$parselitsq_zq(); + if (s1 !== peg$FAILED) { + s2 = peg$parseSUP(); + if (s2 !== peg$FAILED) { + s3 = peg$parselit(); + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c56(s1, s3); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + function peg$parselitsq_dq() { + var s0, s1, s2, s3; + + var key = peg$currPos * 121 + 9, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + s0 = peg$currPos; + s1 = peg$parselitsq_zq(); + if (s1 !== peg$FAILED) { + s2 = peg$parseSUB(); + if (s2 !== peg$FAILED) { + s3 = peg$parselit(); + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c57(s1, s3); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + function peg$parselitsq_zq() { + var s0, s1; + + var key = peg$currPos * 121 + 10, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + s0 = peg$currPos; + s1 = peg$parseSQ_CLOSE(); + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c58(); + } + s0 = s1; + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + function peg$parseexpr_nosqc() { + var s0, s1, s2; + + var key = peg$currPos * 121 + 11, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + s0 = peg$currPos; + s1 = peg$parselit_aq(); + if (s1 !== peg$FAILED) { + s2 = peg$parseexpr_nosqc(); + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c59(s1, s2); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$c50; + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c51(); + } + s0 = s1; + } + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + function peg$parselit_aq() { + var s0; + + var key = peg$currPos * 121 + 12, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + s0 = peg$parselit_fq(); + if (s0 === peg$FAILED) { + s0 = peg$parselit_dq(); + if (s0 === peg$FAILED) { + s0 = peg$parselit_uq(); + if (s0 === peg$FAILED) { + s0 = peg$parselit_dqn(); + if (s0 === peg$FAILED) { + s0 = peg$parselit_uqn(); + if (s0 === peg$FAILED) { + s0 = peg$parselit(); + } + } + } + } + } + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + function peg$parselit_fq() { + var s0, s1, s2, s3; + + var key = peg$currPos * 121 + 13, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + s0 = peg$currPos; + s1 = peg$parselit_dq(); + if (s1 !== peg$FAILED) { + s2 = peg$parseSUP(); + if (s2 !== peg$FAILED) { + s3 = peg$parselit(); + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c54(s1, s3); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parselit_uq(); + if (s1 !== peg$FAILED) { + s2 = peg$parseSUB(); + if (s2 !== peg$FAILED) { + s3 = peg$parselit(); + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c55(s1, s3); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parselit_dqn(); + if (s1 !== peg$FAILED) { + s2 = peg$parseSUP(); + if (s2 !== peg$FAILED) { + s3 = peg$parselit(); + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c60(s1, s3); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + } + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + function peg$parselit_uq() { + var s0, s1, s2, s3; + + var key = peg$currPos * 121 + 14, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + s0 = peg$currPos; + s1 = peg$parselit(); + if (s1 !== peg$FAILED) { + s2 = peg$parseSUP(); + if (s2 !== peg$FAILED) { + s3 = peg$parselit(); + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c56(s1, s3); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + function peg$parselit_dq() { + var s0, s1, s2, s3; + + var key = peg$currPos * 121 + 15, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + s0 = peg$currPos; + s1 = peg$parselit(); + if (s1 !== peg$FAILED) { + s2 = peg$parseSUB(); + if (s2 !== peg$FAILED) { + s3 = peg$parselit(); + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c57(s1, s3); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + function peg$parselit_uqn() { + var s0, s1, s2; + + var key = peg$currPos * 121 + 16, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + s0 = peg$currPos; + s1 = peg$parseSUP(); + if (s1 !== peg$FAILED) { + s2 = peg$parselit(); + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c61(s2); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + function peg$parselit_dqn() { + var s0, s1, s2; + + var key = peg$currPos * 121 + 17, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + s0 = peg$currPos; + s1 = peg$parseSUB(); + if (s1 !== peg$FAILED) { + s2 = peg$parselit(); + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c62(s2); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + function peg$parseleft() { + var s0, s1, s2; + + var key = peg$currPos * 121 + 18, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + s0 = peg$currPos; + s1 = peg$parseLEFT(); + if (s1 !== peg$FAILED) { + s2 = peg$parseDELIMITER(); + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c63(s2); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseLEFT(); + if (s1 !== peg$FAILED) { + s2 = peg$parseSQ_CLOSE(); + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c64(); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + function peg$parseright() { + var s0, s1, s2; + + var key = peg$currPos * 121 + 19, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + s0 = peg$currPos; + s1 = peg$parseRIGHT(); + if (s1 !== peg$FAILED) { + s2 = peg$parseDELIMITER(); + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c63(s2); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseRIGHT(); + if (s1 !== peg$FAILED) { + s2 = peg$parseSQ_CLOSE(); + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c64(); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + function peg$parselit() { + var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, s14, s15, s16, s17, s18; + + var key = peg$currPos * 121 + 20, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + s0 = peg$currPos; + s1 = peg$parsePAREN(); + if (s1 !== peg$FAILED) { + s2 = peg$parseatsymbol(); + if (s2 !== peg$FAILED) { + s3 = peg$parseatsymbol(); + if (s3 !== peg$FAILED) { + s4 = peg$parselit(); + if (s4 !== peg$FAILED) { + peg$savedPos = peg$currPos; + s5 = peg$c65(s1, s4); + if (s5) { + s5 = void 0; + } else { + s5 = peg$FAILED; + } + if (s5 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c66(s1, s4); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parsePAREN(); + if (s1 !== peg$FAILED) { + s2 = peg$parseatsymbol(); + if (s2 !== peg$FAILED) { + s3 = peg$parselit(); + if (s3 !== peg$FAILED) { + peg$savedPos = peg$currPos; + s4 = peg$c65(s1, s3); + if (s4) { + s4 = void 0; + } else { + s4 = peg$FAILED; + } + if (s4 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c67(s1, s3); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.substr(peg$currPos, 2) === peg$c68) { + s1 = peg$c68; + peg$currPos += 2; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c69); } + } + if (s1 !== peg$FAILED) { + s2 = peg$parselit(); + if (s2 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 94) { + s3 = peg$c70; + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c71); } + } + if (s3 !== peg$FAILED) { + s4 = []; + if (input.charCodeAt(peg$currPos) === 123) { + s5 = peg$c35; + peg$currPos++; + } else { + s5 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c36); } + } + while (s5 !== peg$FAILED) { + s4.push(s5); + if (input.charCodeAt(peg$currPos) === 123) { + s5 = peg$c35; + peg$currPos++; + } else { + s5 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c36); } + } + } + if (s4 !== peg$FAILED) { + s5 = peg$parse_(); + if (s5 !== peg$FAILED) { + s6 = peg$parsePAREN_OPEN(); + if (s6 !== peg$FAILED) { + s7 = peg$parse_(); + if (s7 !== peg$FAILED) { + s8 = peg$parselit(); + if (s8 !== peg$FAILED) { + s9 = peg$parse_(); + if (s9 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 44) { + s10 = peg$c72; + peg$currPos++; + } else { + s10 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c73); } + } + if (s10 !== peg$FAILED) { + s11 = peg$parse_(); + if (s11 !== peg$FAILED) { + s12 = peg$parselit(); + if (s12 !== peg$FAILED) { + s13 = peg$parse_(); + if (s13 !== peg$FAILED) { + s14 = peg$parsePAREN_CLOSE(); + if (s14 !== peg$FAILED) { + s15 = peg$parse_(); + if (s15 !== peg$FAILED) { + s16 = []; + if (input.charCodeAt(peg$currPos) === 125) { + s17 = peg$c37; + peg$currPos++; + } else { + s17 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c38); } + } + while (s17 !== peg$FAILED) { + s16.push(s17); + if (input.charCodeAt(peg$currPos) === 125) { + s17 = peg$c37; + peg$currPos++; + } else { + s17 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c38); } + } + } + if (s16 !== peg$FAILED) { + s17 = peg$parselitparen1(); + if (s17 !== peg$FAILED) { + peg$savedPos = peg$currPos; + s18 = peg$c74(s2, s8, s12, s17); + if (s18) { + s18 = void 0; + } else { + s18 = peg$FAILED; + } + if (s18 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c75(s2, s8, s12, s17); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.substr(peg$currPos, 2) === peg$c76) { + s1 = peg$c76; + peg$currPos += 2; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c77); } + } + if (s1 !== peg$FAILED) { + s2 = peg$parselit(); + if (s2 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 94) { + s3 = peg$c70; + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c71); } + } + if (s3 !== peg$FAILED) { + s4 = peg$parselitparen1(); + if (s4 !== peg$FAILED) { + s5 = peg$parselitparen1(); + if (s5 !== peg$FAILED) { + peg$savedPos = peg$currPos; + s6 = peg$c78(s2, s4, s5); + if (s6) { + s6 = void 0; + } else { + s6 = peg$FAILED; + } + if (s6 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c79(s2, s4, s5); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.substr(peg$currPos, 2) === peg$c76) { + s1 = peg$c76; + peg$currPos += 2; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c77); } + } + if (s1 !== peg$FAILED) { + s2 = peg$parselit(); + if (s2 !== peg$FAILED) { + s3 = peg$parselitparen1(); + if (s3 !== peg$FAILED) { + peg$savedPos = peg$currPos; + s4 = peg$c80(s2, s3); + if (s4) { + s4 = void 0; + } else { + s4 = peg$FAILED; + } + if (s4 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c81(s2, s3); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parsePAREN_OPEN(); + if (s1 !== peg$FAILED) { + s2 = peg$parselit(); + if (s2 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 59) { + s3 = peg$c82; + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c83); } + } + if (s3 !== peg$FAILED) { + s4 = peg$parselit(); + if (s4 !== peg$FAILED) { + s5 = peg$parsePAREN_CLOSE(); + if (s5 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 95) { + s6 = peg$c84; + peg$currPos++; + } else { + s6 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c85); } + } + if (s6 !== peg$FAILED) { + s7 = peg$parselit(); + if (s7 !== peg$FAILED) { + peg$savedPos = peg$currPos; + s8 = peg$c78(s2, s4, s7); + if (s8) { + s8 = void 0; + } else { + s8 = peg$FAILED; + } + if (s8 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c86(s2, s4, s7); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parselitparen1(); + if (s1 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 95) { + s2 = peg$c84; + peg$currPos++; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c85); } + } + if (s2 !== peg$FAILED) { + s3 = peg$parselit(); + if (s3 !== peg$FAILED) { + peg$savedPos = peg$currPos; + s4 = peg$c87(s1, s3); + if (s4) { + s4 = void 0; + } else { + s4 = peg$FAILED; + } + if (s4 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c88(s1, s3); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parsePAREN(); + if (s1 !== peg$FAILED) { + s2 = peg$parselitparen1(); + if (s2 !== peg$FAILED) { + peg$savedPos = peg$currPos; + s3 = peg$c65(s1, s2); + if (s3) { + s3 = void 0; + } else { + s3 = peg$FAILED; + } + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c67(s1, s2); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parsePAREN(); + if (s1 !== peg$FAILED) { + s2 = peg$parselit(); + if (s2 !== peg$FAILED) { + peg$savedPos = peg$currPos; + s3 = peg$c89(s1, s2); + if (s3) { + s3 = void 0; + } else { + s3 = peg$FAILED; + } + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c90(s1, s2); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 123) { + s1 = peg$c35; + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c36); } + } + if (s1 !== peg$FAILED) { + s2 = peg$parse_(); + if (s2 !== peg$FAILED) { + if (input.substr(peg$currPos, 3) === peg$c91) { + s3 = peg$c91; + peg$currPos += 3; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c92); } + } + if (s3 !== peg$FAILED) { + s4 = peg$parse_(); + if (s4 !== peg$FAILED) { + s5 = peg$parseEJACOBI(); + if (s5 !== peg$FAILED) { + s6 = peg$parse_(); + if (s6 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 125) { + s7 = peg$c37; + peg$currPos++; + } else { + s7 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c38); } + } + if (s7 !== peg$FAILED) { + s8 = peg$parse_(); + if (s8 !== peg$FAILED) { + s9 = peg$parsePAREN_OPEN(); + if (s9 !== peg$FAILED) { + s10 = peg$parse_(); + if (s10 !== peg$FAILED) { + s11 = peg$parselit(); + if (s11 !== peg$FAILED) { + s12 = peg$parse_(); + if (s12 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 44) { + s13 = peg$c72; + peg$currPos++; + } else { + s13 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c73); } + } + if (s13 !== peg$FAILED) { + s14 = peg$parse_(); + if (s14 !== peg$FAILED) { + s15 = peg$parselit(); + if (s15 !== peg$FAILED) { + s16 = peg$parse_(); + if (s16 !== peg$FAILED) { + s17 = peg$parsePAREN_CLOSE(); + if (s17 !== peg$FAILED) { + peg$savedPos = peg$currPos; + s18 = peg$c93(s5, s11, s15); + if (s18) { + s18 = void 0; + } else { + s18 = peg$FAILED; + } + if (s18 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c94(s5, s11, s15); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseLITERAL(); + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c95(s1); + } + s0 = s1; + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parsegeneric_func(); + if (s1 !== peg$FAILED) { + peg$savedPos = peg$currPos; + s2 = peg$c96(s1); + if (s2) { + s2 = void 0; + } else { + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + s3 = peg$parse_(); + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c97(s1); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseDELIMITER(); + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c95(s1); + } + s0 = s1; + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseBIG(); + if (s1 !== peg$FAILED) { + s2 = peg$parseDELIMITER(); + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c98(s1, s2); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseBIG(); + if (s1 !== peg$FAILED) { + s2 = peg$parseSQ_CLOSE(); + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c99(s1); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseleft(); + if (s1 !== peg$FAILED) { + s2 = peg$parseexpr(); + if (s2 !== peg$FAILED) { + s3 = peg$parseright(); + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c100(s1, s2, s3); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseFUN_AR1opt(); + if (s1 !== peg$FAILED) { + s2 = peg$parseexpr_nosqc(); + if (s2 !== peg$FAILED) { + s3 = peg$parseSQ_CLOSE(); + if (s3 !== peg$FAILED) { + s4 = peg$parselit(); + if (s4 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c101(s1, s2, s4); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseFUN_AR1(); + if (s1 !== peg$FAILED) { + s2 = peg$parselit(); + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c102(s1, s2); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseFUN_AR1nb(); + if (s1 !== peg$FAILED) { + s2 = peg$parselit(); + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c103(s1, s2); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseFUN_AR2(); + if (s1 !== peg$FAILED) { + s2 = peg$parselit(); + if (s2 !== peg$FAILED) { + s3 = peg$parselit(); + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c104(s1, s2, s3); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseFUN_AR2nb(); + if (s1 !== peg$FAILED) { + s2 = peg$parselit(); + if (s2 !== peg$FAILED) { + s3 = peg$parselit(); + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c105(s1, s2, s3); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseFUN_AR3(); + if (s1 !== peg$FAILED) { + s2 = peg$parselit(); + if (s2 !== peg$FAILED) { + s3 = peg$parselit(); + if (s3 !== peg$FAILED) { + s4 = peg$parselit(); + if (s4 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c106(s1, s2, s3, s4); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseJACOBI(); + if (s1 !== peg$FAILED) { + s2 = peg$parselit(); + if (s2 !== peg$FAILED) { + s3 = peg$parselit(); + if (s3 !== peg$FAILED) { + s4 = peg$parselit(); + if (s4 !== peg$FAILED) { + s5 = peg$parseatsymbol(); + if (s5 !== peg$FAILED) { + s6 = peg$parselit(); + if (s6 !== peg$FAILED) { + peg$savedPos = peg$currPos; + s7 = peg$c107(s1, s2, s3, s4, s6); + if (s7) { + s7 = void 0; + } else { + s7 = peg$FAILED; + } + if (s7 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c108(s1, s2, s3, s4, s6); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseLAGUERRE(); + if (s1 !== peg$FAILED) { + s2 = peg$parselit(); + if (s2 !== peg$FAILED) { + s3 = peg$parseatsymbol(); + if (s3 !== peg$FAILED) { + s4 = peg$parselit(); + if (s4 !== peg$FAILED) { + peg$savedPos = peg$currPos; + s5 = peg$c109(s1, s2, s4); + if (s5) { + s5 = void 0; + } else { + s5 = peg$FAILED; + } + if (s5 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c110(s1, s2, s4); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseLAGUERRE(); + if (s1 !== peg$FAILED) { + s2 = peg$parselit(); + if (s2 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 91) { + s3 = peg$c111; + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c112); } + } + if (s3 !== peg$FAILED) { + s4 = peg$parselit(); + if (s4 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 93) { + s5 = peg$c113; + peg$currPos++; + } else { + s5 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c114); } + } + if (s5 !== peg$FAILED) { + s6 = peg$parseatsymbol(); + if (s6 !== peg$FAILED) { + s7 = peg$parselit(); + if (s7 !== peg$FAILED) { + peg$savedPos = peg$currPos; + s8 = peg$c115(s1, s2, s4, s7); + if (s8) { + s8 = void 0; + } else { + s8 = peg$FAILED; + } + if (s8 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c116(s1, s2, s4, s7); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.substr(peg$currPos, 7) === peg$c117) { + s1 = peg$c117; + peg$currPos += 7; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c118); } + } + if (s1 !== peg$FAILED) { + s2 = peg$parseEJACOBI(); + if (s2 !== peg$FAILED) { + s3 = peg$parseatsymbol(); + if (s3 !== peg$FAILED) { + s4 = peg$parselit(); + if (s4 !== peg$FAILED) { + s5 = peg$parselit(); + if (s5 !== peg$FAILED) { + peg$savedPos = peg$currPos; + s6 = peg$c93(s2, s4, s5); + if (s6) { + s6 = void 0; + } else { + s6 = peg$FAILED; + } + if (s6 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c94(s2, s4, s5); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$parseBOX(); + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseCURLY_OPEN(); + if (s1 !== peg$FAILED) { + s2 = peg$parseexpr(); + if (s2 !== peg$FAILED) { + s3 = peg$parseCURLY_CLOSE(); + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c119(s2); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseCURLY_OPEN(); + if (s1 !== peg$FAILED) { + s2 = peg$parsene_expr(); + if (s2 !== peg$FAILED) { + s3 = peg$parseFUN_INFIX(); + if (s3 !== peg$FAILED) { + s4 = peg$parsene_expr(); + if (s4 !== peg$FAILED) { + s5 = peg$parseCURLY_CLOSE(); + if (s5 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c120(s2, s3, s4); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseCURLY_OPEN(); + if (s1 !== peg$FAILED) { + s2 = peg$parsene_expr(); + if (s2 !== peg$FAILED) { + s3 = peg$parseimpossible(); + if (s3 !== peg$FAILED) { + s4 = peg$parsene_expr(); + if (s4 !== peg$FAILED) { + s5 = peg$parseCURLY_CLOSE(); + if (s5 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c121(s2, s3, s4); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseBEGIN_MATRIX(); + if (s1 !== peg$FAILED) { + s2 = peg$parsearray(); + if (s2 === peg$FAILED) { + s2 = peg$parsematrix(); + } + if (s2 !== peg$FAILED) { + s3 = peg$parseEND_MATRIX(); + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c122(s2); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseBEGIN_PMATRIX(); + if (s1 !== peg$FAILED) { + s2 = peg$parsearray(); + if (s2 === peg$FAILED) { + s2 = peg$parsematrix(); + } + if (s2 !== peg$FAILED) { + s3 = peg$parseEND_PMATRIX(); + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c123(s2); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseBEGIN_BMATRIX(); + if (s1 !== peg$FAILED) { + s2 = peg$parsearray(); + if (s2 === peg$FAILED) { + s2 = peg$parsematrix(); + } + if (s2 !== peg$FAILED) { + s3 = peg$parseEND_BMATRIX(); + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c124(s2); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseBEGIN_BBMATRIX(); + if (s1 !== peg$FAILED) { + s2 = peg$parsearray(); + if (s2 === peg$FAILED) { + s2 = peg$parsematrix(); + } + if (s2 !== peg$FAILED) { + s3 = peg$parseEND_BBMATRIX(); + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c125(s2); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseBEGIN_VMATRIX(); + if (s1 !== peg$FAILED) { + s2 = peg$parsearray(); + if (s2 === peg$FAILED) { + s2 = peg$parsematrix(); + } + if (s2 !== peg$FAILED) { + s3 = peg$parseEND_VMATRIX(); + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c126(s2); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseBEGIN_VVMATRIX(); + if (s1 !== peg$FAILED) { + s2 = peg$parsearray(); + if (s2 === peg$FAILED) { + s2 = peg$parsematrix(); + } + if (s2 !== peg$FAILED) { + s3 = peg$parseEND_VVMATRIX(); + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c127(s2); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseBEGIN_ARRAY(); + if (s1 !== peg$FAILED) { + s2 = peg$parseopt_pos(); + if (s2 !== peg$FAILED) { + s3 = peg$parsearray(); + if (s3 !== peg$FAILED) { + s4 = peg$parseEND_ARRAY(); + if (s4 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c128(s3); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseBEGIN_ALIGN(); + if (s1 !== peg$FAILED) { + s2 = peg$parseopt_pos(); + if (s2 !== peg$FAILED) { + s3 = peg$parsematrix(); + if (s3 !== peg$FAILED) { + s4 = peg$parseEND_ALIGN(); + if (s4 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c129(s3); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseBEGIN_ALIGNED(); + if (s1 !== peg$FAILED) { + s2 = peg$parseopt_pos(); + if (s2 !== peg$FAILED) { + s3 = peg$parsematrix(); + if (s3 !== peg$FAILED) { + s4 = peg$parseEND_ALIGNED(); + if (s4 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c129(s3); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseBEGIN_ALIGNAT(); + if (s1 !== peg$FAILED) { + s2 = peg$parsealignat(); + if (s2 !== peg$FAILED) { + s3 = peg$parseEND_ALIGNAT(); + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c130(s2); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseBEGIN_ALIGNEDAT(); + if (s1 !== peg$FAILED) { + s2 = peg$parsealignat(); + if (s2 !== peg$FAILED) { + s3 = peg$parseEND_ALIGNEDAT(); + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c130(s2); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseBEGIN_SMALLMATRIX(); + if (s1 !== peg$FAILED) { + s2 = peg$parsearray(); + if (s2 === peg$FAILED) { + s2 = peg$parsematrix(); + } + if (s2 !== peg$FAILED) { + s3 = peg$parseEND_SMALLMATRIX(); + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c131(s2); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseBEGIN_CASES(); + if (s1 !== peg$FAILED) { + s2 = peg$parsematrix(); + if (s2 !== peg$FAILED) { + s3 = peg$parseEND_CASES(); + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c132(s2); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseBEGIN_MULTLINE(); + if (s1 !== peg$FAILED) { + s2 = peg$parsemultline(); + if (s2 !== peg$FAILED) { + s3 = peg$parseEND_MULTLINE(); + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c133(s2); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseBEGIN_MULTLINE_STAR(); + if (s1 !== peg$FAILED) { + s2 = peg$parsemultline(); + if (s2 !== peg$FAILED) { + s3 = peg$parseEND_MULTLINE_STAR(); + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c134(s2); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.substr(peg$currPos, 7) === peg$c135) { + s1 = peg$c135; + peg$currPos += 7; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c136); } + } + if (s1 !== peg$FAILED) { + s2 = []; + s3 = peg$parsealpha(); + if (s3 !== peg$FAILED) { + while (s3 !== peg$FAILED) { + s2.push(s3); + s3 = peg$parsealpha(); + } + } else { + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 125) { + s3 = peg$c37; + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c38); } + } + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c137(); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parsegeneric_func(); + if (s1 !== peg$FAILED) { + peg$savedPos = peg$currPos; + s2 = peg$c138(s1); + if (s2) { + s2 = void 0; + } else { + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c139(s1); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + function peg$parselitstuff() { + var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, s14, s15, s16, s17, s18; + + var key = peg$currPos * 121 + 21, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + s0 = peg$currPos; + s1 = peg$parsePAREN(); + if (s1 !== peg$FAILED) { + s2 = peg$parseatsymbol(); + if (s2 !== peg$FAILED) { + s3 = peg$parseatsymbol(); + if (s3 !== peg$FAILED) { + s4 = peg$parselit(); + if (s4 !== peg$FAILED) { + peg$savedPos = peg$currPos; + s5 = peg$c65(s1, s4); + if (s5) { + s5 = void 0; + } else { + s5 = peg$FAILED; + } + if (s5 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c66(s1, s4); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parsePAREN(); + if (s1 !== peg$FAILED) { + s2 = peg$parseatsymbol(); + if (s2 !== peg$FAILED) { + s3 = peg$parselit(); + if (s3 !== peg$FAILED) { + peg$savedPos = peg$currPos; + s4 = peg$c65(s1, s3); + if (s4) { + s4 = void 0; + } else { + s4 = peg$FAILED; + } + if (s4 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c67(s1, s3); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.substr(peg$currPos, 2) === peg$c68) { + s1 = peg$c68; + peg$currPos += 2; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c69); } + } + if (s1 !== peg$FAILED) { + s2 = peg$parselit(); + if (s2 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 94) { + s3 = peg$c70; + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c71); } + } + if (s3 !== peg$FAILED) { + s4 = []; + if (input.charCodeAt(peg$currPos) === 123) { + s5 = peg$c35; + peg$currPos++; + } else { + s5 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c36); } + } + while (s5 !== peg$FAILED) { + s4.push(s5); + if (input.charCodeAt(peg$currPos) === 123) { + s5 = peg$c35; + peg$currPos++; + } else { + s5 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c36); } + } + } + if (s4 !== peg$FAILED) { + s5 = peg$parse_(); + if (s5 !== peg$FAILED) { + s6 = peg$parsePAREN_OPEN(); + if (s6 !== peg$FAILED) { + s7 = peg$parse_(); + if (s7 !== peg$FAILED) { + s8 = peg$parselit(); + if (s8 !== peg$FAILED) { + s9 = peg$parse_(); + if (s9 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 44) { + s10 = peg$c72; + peg$currPos++; + } else { + s10 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c73); } + } + if (s10 !== peg$FAILED) { + s11 = peg$parse_(); + if (s11 !== peg$FAILED) { + s12 = peg$parselit(); + if (s12 !== peg$FAILED) { + s13 = peg$parse_(); + if (s13 !== peg$FAILED) { + s14 = peg$parsePAREN_CLOSE(); + if (s14 !== peg$FAILED) { + s15 = peg$parse_(); + if (s15 !== peg$FAILED) { + s16 = []; + if (input.charCodeAt(peg$currPos) === 125) { + s17 = peg$c37; + peg$currPos++; + } else { + s17 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c38); } + } + while (s17 !== peg$FAILED) { + s16.push(s17); + if (input.charCodeAt(peg$currPos) === 125) { + s17 = peg$c37; + peg$currPos++; + } else { + s17 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c38); } + } + } + if (s16 !== peg$FAILED) { + s17 = peg$parselitparen1(); + if (s17 !== peg$FAILED) { + peg$savedPos = peg$currPos; + s18 = peg$c74(s2, s8, s12, s17); + if (s18) { + s18 = void 0; + } else { + s18 = peg$FAILED; + } + if (s18 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c75(s2, s8, s12, s17); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.substr(peg$currPos, 2) === peg$c76) { + s1 = peg$c76; + peg$currPos += 2; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c77); } + } + if (s1 !== peg$FAILED) { + s2 = peg$parselit(); + if (s2 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 94) { + s3 = peg$c70; + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c71); } + } + if (s3 !== peg$FAILED) { + s4 = peg$parselitparen1(); + if (s4 !== peg$FAILED) { + s5 = peg$parselitparen1(); + if (s5 !== peg$FAILED) { + peg$savedPos = peg$currPos; + s6 = peg$c78(s2, s4, s5); + if (s6) { + s6 = void 0; + } else { + s6 = peg$FAILED; + } + if (s6 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c79(s2, s4, s5); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.substr(peg$currPos, 2) === peg$c76) { + s1 = peg$c76; + peg$currPos += 2; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c77); } + } + if (s1 !== peg$FAILED) { + s2 = peg$parselit(); + if (s2 !== peg$FAILED) { + s3 = peg$parselitparen1(); + if (s3 !== peg$FAILED) { + peg$savedPos = peg$currPos; + s4 = peg$c80(s2, s3); + if (s4) { + s4 = void 0; + } else { + s4 = peg$FAILED; + } + if (s4 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c81(s2, s3); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parsePAREN_OPEN(); + if (s1 !== peg$FAILED) { + s2 = peg$parselit(); + if (s2 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 59) { + s3 = peg$c82; + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c83); } + } + if (s3 !== peg$FAILED) { + s4 = peg$parselit(); + if (s4 !== peg$FAILED) { + s5 = peg$parsePAREN_CLOSE(); + if (s5 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 95) { + s6 = peg$c84; + peg$currPos++; + } else { + s6 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c85); } + } + if (s6 !== peg$FAILED) { + s7 = peg$parselit(); + if (s7 !== peg$FAILED) { + peg$savedPos = peg$currPos; + s8 = peg$c78(s2, s4, s7); + if (s8) { + s8 = void 0; + } else { + s8 = peg$FAILED; + } + if (s8 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c86(s2, s4, s7); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parselitparen1(); + if (s1 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 95) { + s2 = peg$c84; + peg$currPos++; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c85); } + } + if (s2 !== peg$FAILED) { + s3 = peg$parselit(); + if (s3 !== peg$FAILED) { + peg$savedPos = peg$currPos; + s4 = peg$c87(s1, s3); + if (s4) { + s4 = void 0; + } else { + s4 = peg$FAILED; + } + if (s4 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c88(s1, s3); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parsePAREN(); + if (s1 !== peg$FAILED) { + s2 = peg$parselitparen1(); + if (s2 !== peg$FAILED) { + peg$savedPos = peg$currPos; + s3 = peg$c65(s1, s2); + if (s3) { + s3 = void 0; + } else { + s3 = peg$FAILED; + } + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c67(s1, s2); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parsePAREN(); + if (s1 !== peg$FAILED) { + s2 = peg$parselit(); + if (s2 !== peg$FAILED) { + peg$savedPos = peg$currPos; + s3 = peg$c89(s1, s2); + if (s3) { + s3 = void 0; + } else { + s3 = peg$FAILED; + } + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c90(s1, s2); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 123) { + s1 = peg$c35; + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c36); } + } + if (s1 !== peg$FAILED) { + s2 = peg$parse_(); + if (s2 !== peg$FAILED) { + if (input.substr(peg$currPos, 3) === peg$c91) { + s3 = peg$c91; + peg$currPos += 3; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c92); } + } + if (s3 !== peg$FAILED) { + s4 = peg$parse_(); + if (s4 !== peg$FAILED) { + s5 = peg$parseEJACOBI(); + if (s5 !== peg$FAILED) { + s6 = peg$parse_(); + if (s6 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 125) { + s7 = peg$c37; + peg$currPos++; + } else { + s7 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c38); } + } + if (s7 !== peg$FAILED) { + s8 = peg$parse_(); + if (s8 !== peg$FAILED) { + s9 = peg$parsePAREN_OPEN(); + if (s9 !== peg$FAILED) { + s10 = peg$parse_(); + if (s10 !== peg$FAILED) { + s11 = peg$parselit(); + if (s11 !== peg$FAILED) { + s12 = peg$parse_(); + if (s12 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 44) { + s13 = peg$c72; + peg$currPos++; + } else { + s13 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c73); } + } + if (s13 !== peg$FAILED) { + s14 = peg$parse_(); + if (s14 !== peg$FAILED) { + s15 = peg$parselit(); + if (s15 !== peg$FAILED) { + s16 = peg$parse_(); + if (s16 !== peg$FAILED) { + s17 = peg$parsePAREN_CLOSE(); + if (s17 !== peg$FAILED) { + peg$savedPos = peg$currPos; + s18 = peg$c93(s5, s11, s15); + if (s18) { + s18 = void 0; + } else { + s18 = peg$FAILED; + } + if (s18 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c94(s5, s11, s15); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseBIG(); + if (s1 !== peg$FAILED) { + s2 = peg$parseDELIMITER(); + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c98(s1, s2); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseBIG(); + if (s1 !== peg$FAILED) { + s2 = peg$parseSQ_CLOSE(); + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c99(s1); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseleft(); + if (s1 !== peg$FAILED) { + s2 = peg$parseexpr(); + if (s2 !== peg$FAILED) { + s3 = peg$parseright(); + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c100(s1, s2, s3); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseFUN_AR1opt(); + if (s1 !== peg$FAILED) { + s2 = peg$parseexpr_nosqc(); + if (s2 !== peg$FAILED) { + s3 = peg$parseSQ_CLOSE(); + if (s3 !== peg$FAILED) { + s4 = peg$parselit(); + if (s4 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c101(s1, s2, s4); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseFUN_AR1(); + if (s1 !== peg$FAILED) { + s2 = peg$parselit(); + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c102(s1, s2); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseFUN_AR1nb(); + if (s1 !== peg$FAILED) { + s2 = peg$parselit(); + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c103(s1, s2); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseimpossible(); + if (s1 !== peg$FAILED) { + s2 = peg$parselit(); + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c140(s1, s2); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseimpossible(); + if (s1 !== peg$FAILED) { + s2 = peg$parselit(); + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c141(s1, s2); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseFUN_AR2(); + if (s1 !== peg$FAILED) { + s2 = peg$parselit(); + if (s2 !== peg$FAILED) { + s3 = peg$parselit(); + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c104(s1, s2, s3); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseFUN_AR2nb(); + if (s1 !== peg$FAILED) { + s2 = peg$parselit(); + if (s2 !== peg$FAILED) { + s3 = peg$parselit(); + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c105(s1, s2, s3); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseimpossible(); + if (s1 !== peg$FAILED) { + s2 = peg$parselit(); + if (s2 !== peg$FAILED) { + s3 = peg$parselit(); + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c142(s1, s2, s3); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseFUN_AR3(); + if (s1 !== peg$FAILED) { + s2 = peg$parselit(); + if (s2 !== peg$FAILED) { + s3 = peg$parselit(); + if (s3 !== peg$FAILED) { + s4 = peg$parselit(); + if (s4 !== peg$FAILED) { + peg$savedPos = peg$currPos; + s5 = peg$c143(s1, s2, s3, s4); + if (s5) { + s5 = void 0; + } else { + s5 = peg$FAILED; + } + if (s5 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c106(s1, s2, s3, s4); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseJACOBI(); + if (s1 !== peg$FAILED) { + s2 = peg$parselit(); + if (s2 !== peg$FAILED) { + s3 = peg$parselit(); + if (s3 !== peg$FAILED) { + s4 = peg$parselit(); + if (s4 !== peg$FAILED) { + s5 = peg$parseatsymbol(); + if (s5 !== peg$FAILED) { + s6 = peg$parselit(); + if (s6 !== peg$FAILED) { + peg$savedPos = peg$currPos; + s7 = peg$c107(s1, s2, s3, s4, s6); + if (s7) { + s7 = void 0; + } else { + s7 = peg$FAILED; + } + if (s7 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c108(s1, s2, s3, s4, s6); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseLAGUERRE(); + if (s1 !== peg$FAILED) { + s2 = peg$parselit(); + if (s2 !== peg$FAILED) { + s3 = peg$parseatsymbol(); + if (s3 !== peg$FAILED) { + s4 = peg$parselit(); + if (s4 !== peg$FAILED) { + peg$savedPos = peg$currPos; + s5 = peg$c109(s1, s2, s4); + if (s5) { + s5 = void 0; + } else { + s5 = peg$FAILED; + } + if (s5 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c110(s1, s2, s4); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseLAGUERRE(); + if (s1 !== peg$FAILED) { + s2 = peg$parselit(); + if (s2 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 91) { + s3 = peg$c111; + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c112); } + } + if (s3 !== peg$FAILED) { + s4 = peg$parselit(); + if (s4 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 93) { + s5 = peg$c113; + peg$currPos++; + } else { + s5 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c114); } + } + if (s5 !== peg$FAILED) { + s6 = peg$parseatsymbol(); + if (s6 !== peg$FAILED) { + s7 = peg$parselit(); + if (s7 !== peg$FAILED) { + peg$savedPos = peg$currPos; + s8 = peg$c115(s1, s2, s4, s7); + if (s8) { + s8 = void 0; + } else { + s8 = peg$FAILED; + } + if (s8 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c116(s1, s2, s4, s7); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.substr(peg$currPos, 7) === peg$c117) { + s1 = peg$c117; + peg$currPos += 7; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c118); } + } + if (s1 !== peg$FAILED) { + s2 = peg$parseEJACOBI(); + if (s2 !== peg$FAILED) { + s3 = peg$parseatsymbol(); + if (s3 !== peg$FAILED) { + s4 = peg$parselit(); + if (s4 !== peg$FAILED) { + s5 = peg$parselit(); + if (s5 !== peg$FAILED) { + peg$savedPos = peg$currPos; + s6 = peg$c93(s2, s4, s5); + if (s6) { + s6 = void 0; + } else { + s6 = peg$FAILED; + } + if (s6 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c94(s2, s4, s5); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$parseBOX(); + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseCURLY_OPEN(); + if (s1 !== peg$FAILED) { + s2 = peg$parseexpr(); + if (s2 !== peg$FAILED) { + s3 = peg$parseCURLY_CLOSE(); + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c119(s2); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseCURLY_OPEN(); + if (s1 !== peg$FAILED) { + s2 = peg$parsene_expr(); + if (s2 !== peg$FAILED) { + s3 = peg$parseFUN_INFIX(); + if (s3 !== peg$FAILED) { + s4 = peg$parsene_expr(); + if (s4 !== peg$FAILED) { + s5 = peg$parseCURLY_CLOSE(); + if (s5 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c120(s2, s3, s4); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseCURLY_OPEN(); + if (s1 !== peg$FAILED) { + s2 = peg$parsene_expr(); + if (s2 !== peg$FAILED) { + s3 = peg$parseimpossible(); + if (s3 !== peg$FAILED) { + s4 = peg$parsene_expr(); + if (s4 !== peg$FAILED) { + s5 = peg$parseCURLY_CLOSE(); + if (s5 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c121(s2, s3, s4); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseBEGIN_MATRIX(); + if (s1 !== peg$FAILED) { + s2 = peg$parsearray(); + if (s2 === peg$FAILED) { + s2 = peg$parsematrix(); + } + if (s2 !== peg$FAILED) { + s3 = peg$parseEND_MATRIX(); + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c122(s2); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseBEGIN_PMATRIX(); + if (s1 !== peg$FAILED) { + s2 = peg$parsearray(); + if (s2 === peg$FAILED) { + s2 = peg$parsematrix(); + } + if (s2 !== peg$FAILED) { + s3 = peg$parseEND_PMATRIX(); + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c123(s2); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseBEGIN_BMATRIX(); + if (s1 !== peg$FAILED) { + s2 = peg$parsearray(); + if (s2 === peg$FAILED) { + s2 = peg$parsematrix(); + } + if (s2 !== peg$FAILED) { + s3 = peg$parseEND_BMATRIX(); + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c124(s2); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseBEGIN_BBMATRIX(); + if (s1 !== peg$FAILED) { + s2 = peg$parsearray(); + if (s2 === peg$FAILED) { + s2 = peg$parsematrix(); + } + if (s2 !== peg$FAILED) { + s3 = peg$parseEND_BBMATRIX(); + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c125(s2); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseBEGIN_VMATRIX(); + if (s1 !== peg$FAILED) { + s2 = peg$parsearray(); + if (s2 === peg$FAILED) { + s2 = peg$parsematrix(); + } + if (s2 !== peg$FAILED) { + s3 = peg$parseEND_VMATRIX(); + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c126(s2); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseBEGIN_VVMATRIX(); + if (s1 !== peg$FAILED) { + s2 = peg$parsearray(); + if (s2 === peg$FAILED) { + s2 = peg$parsematrix(); + } + if (s2 !== peg$FAILED) { + s3 = peg$parseEND_VVMATRIX(); + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c127(s2); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseBEGIN_ARRAY(); + if (s1 !== peg$FAILED) { + s2 = peg$parseopt_pos(); + if (s2 !== peg$FAILED) { + s3 = peg$parsearray(); + if (s3 !== peg$FAILED) { + s4 = peg$parseEND_ARRAY(); + if (s4 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c128(s3); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseBEGIN_ALIGN(); + if (s1 !== peg$FAILED) { + s2 = peg$parseopt_pos(); + if (s2 !== peg$FAILED) { + s3 = peg$parsematrix(); + if (s3 !== peg$FAILED) { + s4 = peg$parseEND_ALIGN(); + if (s4 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c129(s3); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseBEGIN_ALIGNED(); + if (s1 !== peg$FAILED) { + s2 = peg$parseopt_pos(); + if (s2 !== peg$FAILED) { + s3 = peg$parsematrix(); + if (s3 !== peg$FAILED) { + s4 = peg$parseEND_ALIGNED(); + if (s4 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c129(s3); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseBEGIN_ALIGNAT(); + if (s1 !== peg$FAILED) { + s2 = peg$parsealignat(); + if (s2 !== peg$FAILED) { + s3 = peg$parseEND_ALIGNAT(); + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c130(s2); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseBEGIN_ALIGNEDAT(); + if (s1 !== peg$FAILED) { + s2 = peg$parsealignat(); + if (s2 !== peg$FAILED) { + s3 = peg$parseEND_ALIGNEDAT(); + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c130(s2); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseBEGIN_SMALLMATRIX(); + if (s1 !== peg$FAILED) { + s2 = peg$parsearray(); + if (s2 === peg$FAILED) { + s2 = peg$parsematrix(); + } + if (s2 !== peg$FAILED) { + s3 = peg$parseEND_SMALLMATRIX(); + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c131(s2); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseBEGIN_CASES(); + if (s1 !== peg$FAILED) { + s2 = peg$parsematrix(); + if (s2 !== peg$FAILED) { + s3 = peg$parseEND_CASES(); + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c132(s2); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseBEGIN_MULTLINE(); + if (s1 !== peg$FAILED) { + s2 = peg$parsemultline(); + if (s2 !== peg$FAILED) { + s3 = peg$parseEND_MULTLINE(); + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c133(s2); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseBEGIN_MULTLINE_STAR(); + if (s1 !== peg$FAILED) { + s2 = peg$parsemultline(); + if (s2 !== peg$FAILED) { + s3 = peg$parseEND_MULTLINE_STAR(); + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c134(s2); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.substr(peg$currPos, 7) === peg$c135) { + s1 = peg$c135; + peg$currPos += 7; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c136); } + } + if (s1 !== peg$FAILED) { + s2 = []; + s3 = peg$parsealpha(); + if (s3 !== peg$FAILED) { + while (s3 !== peg$FAILED) { + s2.push(s3); + s3 = peg$parsealpha(); + } + } else { + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 125) { + s3 = peg$c37; + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c38); } + } + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c137(); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parsegeneric_func(); + if (s1 !== peg$FAILED) { + peg$savedPos = peg$currPos; + s2 = peg$c138(s1); + if (s2) { + s2 = void 0; + } else { + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c144(s1); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseLITERALPART(); + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c145(s1); + } + s0 = s1; + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + function peg$parselitparen1() { + var s0, s1, s2, s3, s4, s5; + + var key = peg$currPos * 121 + 22, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 123) { + s1 = peg$c35; + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c36); } + } + if (s1 !== peg$FAILED) { + s2 = peg$parse_(); + if (s2 !== peg$FAILED) { + s3 = peg$parselitparen1(); + if (s3 !== peg$FAILED) { + s4 = peg$parse_(); + if (s4 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 125) { + s5 = peg$c37; + peg$currPos++; + } else { + s5 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c38); } + } + if (s5 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c146(s3); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parselitparen(); + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c146(s1); + } + s0 = s1; + } + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + function peg$parselitparen() { + var s0, s1, s2, s3, s4, s5; + + var key = peg$currPos * 121 + 23, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + s0 = peg$currPos; + s1 = peg$parsePAREN_OPEN(); + if (s1 !== peg$FAILED) { + s2 = peg$parse_(); + if (s2 !== peg$FAILED) { + s3 = peg$parselitplus(); + if (s3 !== peg$FAILED) { + s4 = peg$parse_(); + if (s4 !== peg$FAILED) { + s5 = peg$parsePAREN_CLOSE(); + if (s5 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c147(s3); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + function peg$parselitplus() { + var s0, s1, s2; + + var key = peg$currPos * 121 + 24, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + s0 = peg$currPos; + s1 = peg$parselitstuff(); + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c146(s1); + } + s0 = s1; + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = []; + s2 = peg$parseLITERAL(); + if (s2 !== peg$FAILED) { + while (s2 !== peg$FAILED) { + s1.push(s2); + s2 = peg$parseLITERAL(); + } + } else { + s1 = peg$FAILED; + } + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c148(s1); + } + s0 = s1; + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$c50; + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c149(); + } + s0 = s1; + } + } + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + function peg$parsearray() { + var s0, s1, s2; + + var key = peg$currPos * 121 + 25, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + s0 = peg$currPos; + s1 = peg$parsecolumn_spec(); + if (s1 !== peg$FAILED) { + s2 = peg$parsematrix(); + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c150(s1, s2); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + function peg$parsealignat() { + var s0, s1, s2; + + var key = peg$currPos * 121 + 26, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + s0 = peg$currPos; + s1 = peg$parsealignat_spec(); + if (s1 !== peg$FAILED) { + s2 = peg$parsematrix(); + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c151(s1, s2); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + function peg$parsematrix() { + var s0, s1, s2, s3, s4; + + var key = peg$currPos * 121 + 27, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + s0 = peg$currPos; + s1 = peg$parseline_start(); + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + s3 = peg$parseNEXT_ROW(); + if (s3 !== peg$FAILED) { + s4 = peg$parsematrix(); + if (s4 !== peg$FAILED) { + peg$savedPos = s2; + s3 = peg$c152(s1, s4); + s2 = s3; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 === peg$FAILED) { + s2 = null; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c153(s1, s2); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + function peg$parseline_start() { + var s0, s1, s2; + + var key = peg$currPos * 121 + 28, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + s0 = peg$currPos; + s1 = peg$parseHLINE(); + if (s1 !== peg$FAILED) { + s2 = peg$parseline_start(); + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c154(s1, s2); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$parseline(); + } + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + function peg$parseline() { + var s0, s1, s2, s3, s4; + + var key = peg$currPos * 121 + 29, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + s0 = peg$currPos; + s1 = peg$parseexpr(); + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + s3 = peg$parseNEXT_CELL(); + if (s3 !== peg$FAILED) { + s4 = peg$parseline(); + if (s4 !== peg$FAILED) { + peg$savedPos = s2; + s3 = peg$c155(s1, s4); + s2 = s3; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 === peg$FAILED) { + s2 = null; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c156(s1, s2); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + function peg$parsemultline() { + var s0, s1, s2, s3, s4; + + var key = peg$currPos * 121 + 30, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + s0 = peg$currPos; + s1 = peg$parsemline_start(); + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + s3 = peg$parseNEXT_ROW(); + if (s3 !== peg$FAILED) { + s4 = peg$parsemultline(); + if (s4 !== peg$FAILED) { + peg$savedPos = s2; + s3 = peg$c152(s1, s4); + s2 = s3; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 === peg$FAILED) { + s2 = null; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c153(s1, s2); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + function peg$parsemline_start() { + var s0, s1, s2; + + var key = peg$currPos * 121 + 31, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + s0 = peg$currPos; + s1 = peg$parseHLINE(); + if (s1 !== peg$FAILED) { + s2 = peg$parsemline_start(); + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c157(s1, s2); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseexpr(); + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c158(s1); + } + s0 = s1; + } + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + function peg$parsecolumn_spec() { + var s0, s1, s2, s3, s4; + + var key = peg$currPos * 121 + 32, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + s0 = peg$currPos; + s1 = peg$parseCURLY_OPEN(); + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + s3 = []; + s4 = peg$parseone_col(); + if (s4 !== peg$FAILED) { + while (s4 !== peg$FAILED) { + s3.push(s4); + s4 = peg$parseone_col(); + } + } else { + s3 = peg$FAILED; + } + if (s3 !== peg$FAILED) { + peg$savedPos = s2; + s3 = peg$c159(); + } + s2 = s3; + if (s2 !== peg$FAILED) { + s3 = peg$parseCURLY_CLOSE(); + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c160(s2); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + function peg$parseone_col() { + var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9; + + var key = peg$currPos * 121 + 33, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + s0 = peg$currPos; + if (peg$c161.test(input.charAt(peg$currPos))) { + s1 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c162); } + } + if (s1 !== peg$FAILED) { + s2 = peg$parse_(); + if (s2 !== peg$FAILED) { + s1 = [s1, s2]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 112) { + s1 = peg$c163; + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c164); } + } + if (s1 !== peg$FAILED) { + s2 = peg$parseCURLY_OPEN(); + if (s2 !== peg$FAILED) { + s3 = []; + s4 = peg$parseboxchars(); + if (s4 !== peg$FAILED) { + while (s4 !== peg$FAILED) { + s3.push(s4); + s4 = peg$parseboxchars(); + } + } else { + s3 = peg$FAILED; + } + if (s3 !== peg$FAILED) { + s4 = peg$parseCURLY_CLOSE(); + if (s4 !== peg$FAILED) { + s1 = [s1, s2, s3, s4]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 42) { + s1 = peg$c165; + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c166); } + } + if (s1 !== peg$FAILED) { + s2 = peg$parseCURLY_OPEN(); + if (s2 !== peg$FAILED) { + s3 = []; + if (peg$c167.test(input.charAt(peg$currPos))) { + s4 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s4 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c168); } + } + if (s4 !== peg$FAILED) { + while (s4 !== peg$FAILED) { + s3.push(s4); + if (peg$c167.test(input.charAt(peg$currPos))) { + s4 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s4 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c168); } + } + } + } else { + s3 = peg$FAILED; + } + if (s3 !== peg$FAILED) { + s4 = peg$parse_(); + if (s4 !== peg$FAILED) { + s5 = peg$parseCURLY_CLOSE(); + if (s5 !== peg$FAILED) { + s6 = peg$parseone_col(); + if (s6 === peg$FAILED) { + s6 = peg$currPos; + s7 = peg$parseCURLY_OPEN(); + if (s7 !== peg$FAILED) { + s8 = []; + s9 = peg$parseone_col(); + if (s9 !== peg$FAILED) { + while (s9 !== peg$FAILED) { + s8.push(s9); + s9 = peg$parseone_col(); + } + } else { + s8 = peg$FAILED; + } + if (s8 !== peg$FAILED) { + s9 = peg$parseCURLY_CLOSE(); + if (s9 !== peg$FAILED) { + s7 = [s7, s8, s9]; + s6 = s7; + } else { + peg$currPos = s6; + s6 = peg$FAILED; + } + } else { + peg$currPos = s6; + s6 = peg$FAILED; + } + } else { + peg$currPos = s6; + s6 = peg$FAILED; + } + } + if (s6 !== peg$FAILED) { + s1 = [s1, s2, s3, s4, s5, s6]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.substr(peg$currPos, 2) === peg$c169) { + s1 = peg$c169; + peg$currPos += 2; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c170); } + } + if (s1 !== peg$FAILED) { + s2 = peg$parse_(); + if (s2 !== peg$FAILED) { + s1 = [s1, s2]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 124) { + s1 = peg$c171; + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c172); } + } + if (s1 !== peg$FAILED) { + s2 = peg$parse_(); + if (s2 !== peg$FAILED) { + s1 = [s1, s2]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 64) { + s1 = peg$c173; + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c174); } + } + if (s1 !== peg$FAILED) { + s2 = peg$parse_(); + if (s2 !== peg$FAILED) { + s3 = peg$parseCURLY_OPEN(); + if (s3 !== peg$FAILED) { + s4 = []; + s5 = peg$parseboxchars(); + if (s5 !== peg$FAILED) { + while (s5 !== peg$FAILED) { + s4.push(s5); + s5 = peg$parseboxchars(); + } + } else { + s4 = peg$FAILED; + } + if (s4 !== peg$FAILED) { + s5 = peg$parseCURLY_CLOSE(); + if (s5 !== peg$FAILED) { + s1 = [s1, s2, s3, s4, s5]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + } + } + } + } + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + function peg$parsealignat_spec() { + var s0, s1, s2, s3, s4; + + var key = peg$currPos * 121 + 34, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + s0 = peg$currPos; + s1 = peg$parseCURLY_OPEN(); + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + s3 = []; + if (peg$c167.test(input.charAt(peg$currPos))) { + s4 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s4 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c168); } + } + if (s4 !== peg$FAILED) { + while (s4 !== peg$FAILED) { + s3.push(s4); + if (peg$c167.test(input.charAt(peg$currPos))) { + s4 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s4 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c168); } + } + } + } else { + s3 = peg$FAILED; + } + if (s3 !== peg$FAILED) { + peg$savedPos = s2; + s3 = peg$c159(); + } + s2 = s3; + if (s2 !== peg$FAILED) { + s3 = peg$parse_(); + if (s3 !== peg$FAILED) { + s4 = peg$parseCURLY_CLOSE(); + if (s4 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c175(s2); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + function peg$parseopt_pos() { + var s0, s1, s2, s3, s4, s5, s6; + + var key = peg$currPos * 121 + 35, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 91) { + s1 = peg$c111; + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c112); } + } + if (s1 !== peg$FAILED) { + s2 = peg$parse_(); + if (s2 !== peg$FAILED) { + if (peg$c176.test(input.charAt(peg$currPos))) { + s3 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c177); } + } + if (s3 !== peg$FAILED) { + s4 = peg$parse_(); + if (s4 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 93) { + s5 = peg$c113; + peg$currPos++; + } else { + s5 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c114); } + } + if (s5 !== peg$FAILED) { + s6 = peg$parse_(); + if (s6 !== peg$FAILED) { + s1 = [s1, s2, s3, s4, s5, s6]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$c50; + } + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + function peg$parsealpha() { + var s0; + + var key = peg$currPos * 121 + 36, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + if (peg$c178.test(input.charAt(peg$currPos))) { + s0 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c179); } + } + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + function peg$parseliteral_id() { + var s0; + + var key = peg$currPos * 121 + 37, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + if (peg$c178.test(input.charAt(peg$currPos))) { + s0 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c179); } + } + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + function peg$parseliteral_mn() { + var s0; + + var key = peg$currPos * 121 + 38, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + if (peg$c167.test(input.charAt(peg$currPos))) { + s0 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c168); } + } + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + function peg$parseliteral_uf_lt() { + var s0; + + var key = peg$currPos * 121 + 39, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + if (peg$c180.test(input.charAt(peg$currPos))) { + s0 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c181); } + } + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + function peg$parsedelimiter_uf_lt() { + var s0; + + var key = peg$currPos * 121 + 40, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + if (peg$c182.test(input.charAt(peg$currPos))) { + s0 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c183); } + } + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + function peg$parseliteral_uf_op() { + var s0; + + var key = peg$currPos * 121 + 41, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + if (peg$c184.test(input.charAt(peg$currPos))) { + s0 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c185); } + } + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + function peg$parsedelimiter_uf_op() { + var s0; + + var key = peg$currPos * 121 + 42, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + if (peg$c186.test(input.charAt(peg$currPos))) { + s0 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c187); } + } + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + function peg$parsenum() { + var s0, s1, s2, s3, s4, s5, s6; + + var key = peg$currPos * 121 + 43, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 45) { + s1 = peg$c188; + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c189); } + } + if (s1 === peg$FAILED) { + s1 = null; + } + if (s1 !== peg$FAILED) { + s2 = []; + if (peg$c167.test(input.charAt(peg$currPos))) { + s3 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c168); } + } + while (s3 !== peg$FAILED) { + s2.push(s3); + if (peg$c167.test(input.charAt(peg$currPos))) { + s3 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c168); } + } + } + if (s2 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 46) { + s3 = peg$c190; + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c191); } + } + if (s3 !== peg$FAILED) { + s4 = []; + if (peg$c167.test(input.charAt(peg$currPos))) { + s5 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s5 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c168); } + } + if (s5 !== peg$FAILED) { + while (s5 !== peg$FAILED) { + s4.push(s5); + if (peg$c167.test(input.charAt(peg$currPos))) { + s5 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s5 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c168); } + } + } + } else { + s4 = peg$FAILED; + } + if (s4 !== peg$FAILED) { + s5 = peg$parse_(); + if (s5 !== peg$FAILED) { + s6 = peg$parsespce(); + if (s6 === peg$FAILED) { + s6 = null; + } + if (s6 !== peg$FAILED) { + s1 = [s1, s2, s3, s4, s5, s6]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 45) { + s1 = peg$c188; + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c189); } + } + if (s1 === peg$FAILED) { + s1 = null; + } + if (s1 !== peg$FAILED) { + s2 = []; + if (peg$c167.test(input.charAt(peg$currPos))) { + s3 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c168); } + } + if (s3 !== peg$FAILED) { + while (s3 !== peg$FAILED) { + s2.push(s3); + if (peg$c167.test(input.charAt(peg$currPos))) { + s3 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c168); } + } + } + } else { + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 46) { + s3 = peg$c190; + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c191); } + } + if (s3 === peg$FAILED) { + s3 = null; + } + if (s3 !== peg$FAILED) { + s4 = peg$parse_(); + if (s4 !== peg$FAILED) { + s5 = peg$parsespce(); + if (s5 === peg$FAILED) { + s5 = null; + } + if (s5 !== peg$FAILED) { + s1 = [s1, s2, s3, s4, s5]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + function peg$parsespce() { + var s0; + + var key = peg$currPos * 121 + 44, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + if (input.substr(peg$currPos, 2) === peg$c192) { + s0 = peg$c192; + peg$currPos += 2; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c193); } + } + if (s0 === peg$FAILED) { + if (input.substr(peg$currPos, 2) === peg$c194) { + s0 = peg$c194; + peg$currPos += 2; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c195); } + } + if (s0 === peg$FAILED) { + if (input.substr(peg$currPos, 2) === peg$c196) { + s0 = peg$c196; + peg$currPos += 2; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c197); } + } + if (s0 === peg$FAILED) { + if (input.substr(peg$currPos, 2) === peg$c198) { + s0 = peg$c198; + peg$currPos += 2; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c199); } + } + if (s0 === peg$FAILED) { + if (input.substr(peg$currPos, 2) === peg$c200) { + s0 = peg$c200; + peg$currPos += 2; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c201); } + } + if (s0 === peg$FAILED) { + if (input.substr(peg$currPos, 2) === peg$c202) { + s0 = peg$c202; + peg$currPos += 2; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c203); } + } + if (s0 === peg$FAILED) { + if (input.substr(peg$currPos, 2) === peg$c204) { + s0 = peg$c204; + peg$currPos += 2; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c205); } + } + if (s0 === peg$FAILED) { + if (input.substr(peg$currPos, 2) === peg$c206) { + s0 = peg$c206; + peg$currPos += 2; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c207); } + } + if (s0 === peg$FAILED) { + if (input.substr(peg$currPos, 2) === peg$c208) { + s0 = peg$c208; + peg$currPos += 2; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c209); } + } + if (s0 === peg$FAILED) { + if (input.substr(peg$currPos, 2) === peg$c210) { + s0 = peg$c210; + peg$currPos += 2; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c211); } + } + if (s0 === peg$FAILED) { + if (input.substr(peg$currPos, 2) === peg$c212) { + s0 = peg$c212; + peg$currPos += 2; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c213); } + } + if (s0 === peg$FAILED) { + if (input.substr(peg$currPos, 2) === peg$c214) { + s0 = peg$c214; + peg$currPos += 2; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c215); } + } + if (s0 === peg$FAILED) { + if (input.substr(peg$currPos, 2) === peg$c216) { + s0 = peg$c216; + peg$currPos += 2; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c217); } + } + } + } + } + } + } + } + } + } + } + } + } + } + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + function peg$parseatsymbol() { + var s0; + + var key = peg$currPos * 121 + 45, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + if (peg$c218.test(input.charAt(peg$currPos))) { + s0 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c219); } + } + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + function peg$parseboxchars() { + var s0, s1, s2; + + var key = peg$currPos * 121 + 46, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + if (peg$c220.test(input.charAt(peg$currPos))) { + s0 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c221); } + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (peg$c222.test(input.charAt(peg$currPos))) { + s1 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c223); } + } + if (s1 !== peg$FAILED) { + if (peg$c224.test(input.charAt(peg$currPos))) { + s2 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c225); } + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c226(s1, s2); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + function peg$parseBOX() { + var s0, s1, s2, s3, s4, s5, s6, s7; + + var key = peg$currPos * 121 + 47, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + s0 = peg$currPos; + s1 = peg$parsegeneric_func(); + if (s1 !== peg$FAILED) { + peg$savedPos = peg$currPos; + s2 = peg$c227(s1); + if (s2) { + s2 = void 0; + } else { + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + s3 = peg$parse_(); + if (s3 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 123) { + s4 = peg$c35; + peg$currPos++; + } else { + s4 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c36); } + } + if (s4 !== peg$FAILED) { + s5 = []; + s6 = peg$parseboxchars(); + if (s6 !== peg$FAILED) { + while (s6 !== peg$FAILED) { + s5.push(s6); + s6 = peg$parseboxchars(); + } + } else { + s5 = peg$FAILED; + } + if (s5 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 125) { + s6 = peg$c37; + peg$currPos++; + } else { + s6 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c38); } + } + if (s6 !== peg$FAILED) { + s7 = peg$parse_(); + if (s7 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c228(s1, s5); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + function peg$parseLITERAL() { + var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9; + + var key = peg$currPos * 121 + 48, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + s0 = peg$currPos; + s1 = peg$parseliteral_id(); + if (s1 === peg$FAILED) { + s1 = peg$parseliteral_mn(); + if (s1 === peg$FAILED) { + s1 = peg$parseliteral_uf_lt(); + if (s1 === peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 45) { + s1 = peg$c188; + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c189); } + } + if (s1 === peg$FAILED) { + s1 = peg$parseliteral_uf_op(); + } + } + } + } + if (s1 !== peg$FAILED) { + s2 = peg$parse_(); + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c229(s1); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parsegeneric_func(); + if (s1 !== peg$FAILED) { + peg$savedPos = peg$currPos; + s2 = peg$c230(s1); + if (s2) { + s2 = void 0; + } else { + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + s3 = peg$parse_(); + if (s3 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 40) { + s4 = peg$c231; + peg$currPos++; + } else { + s4 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c232); } + } + if (s4 === peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 91) { + s4 = peg$c111; + peg$currPos++; + } else { + s4 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c112); } + } + if (s4 === peg$FAILED) { + if (input.substr(peg$currPos, 2) === peg$c233) { + s4 = peg$c233; + peg$currPos += 2; + } else { + s4 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c234); } + } + if (s4 === peg$FAILED) { + s4 = peg$currPos; + s5 = peg$c50; + if (s5 !== peg$FAILED) { + peg$savedPos = s4; + s5 = peg$c235(s1); + } + s4 = s5; + } + } + } + if (s4 !== peg$FAILED) { + s5 = peg$parse_(); + if (s5 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c236(s1, s4); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parsegeneric_func(); + if (s1 !== peg$FAILED) { + peg$savedPos = peg$currPos; + s2 = peg$c237(s1); + if (s2) { + s2 = void 0; + } else { + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + s3 = peg$parse_(); + if (s3 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 40) { + s4 = peg$c231; + peg$currPos++; + } else { + s4 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c232); } + } + if (s4 === peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 91) { + s4 = peg$c111; + peg$currPos++; + } else { + s4 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c112); } + } + if (s4 === peg$FAILED) { + if (input.substr(peg$currPos, 2) === peg$c233) { + s4 = peg$c233; + peg$currPos += 2; + } else { + s4 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c234); } + } + if (s4 === peg$FAILED) { + s4 = peg$currPos; + s5 = peg$c50; + if (s5 !== peg$FAILED) { + peg$savedPos = s4; + s5 = peg$c238(s1); + } + s4 = s5; + } + } + } + if (s4 !== peg$FAILED) { + s5 = peg$parse_(); + if (s5 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c239(s1, s4); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parsegeneric_func(); + if (s1 !== peg$FAILED) { + peg$savedPos = peg$currPos; + s2 = peg$c240(s1); + if (s2) { + s2 = void 0; + } else { + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + s3 = peg$parse_(); + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c241(s1); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parsegeneric_func(); + if (s1 !== peg$FAILED) { + peg$savedPos = peg$currPos; + s2 = peg$c242(s1); + if (s2) { + s2 = void 0; + } else { + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + s3 = peg$parse_(); + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c243(s1); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parsegeneric_func(); + if (s1 !== peg$FAILED) { + peg$savedPos = peg$currPos; + s2 = peg$c244(s1); + if (s2) { + s2 = void 0; + } else { + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + s3 = peg$parse_(); + if (s3 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 123) { + s4 = peg$c35; + peg$currPos++; + } else { + s4 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c36); } + } + if (s4 !== peg$FAILED) { + s5 = peg$parsegeneric_func(); + if (s5 !== peg$FAILED) { + peg$savedPos = peg$currPos; + s6 = peg$c245(s1, s5); + if (s6) { + s6 = void 0; + } else { + s6 = peg$FAILED; + } + if (s6 !== peg$FAILED) { + s7 = peg$parse_(); + if (s7 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 125) { + s8 = peg$c37; + peg$currPos++; + } else { + s8 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c38); } + } + if (s8 !== peg$FAILED) { + s9 = peg$parse_(); + if (s9 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c246(s1, s5); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parsegeneric_func(); + if (s1 !== peg$FAILED) { + peg$savedPos = peg$currPos; + s2 = peg$c247(s1); + if (s2) { + s2 = void 0; + } else { + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + s3 = peg$parse_(); + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c248(s1); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parsegeneric_func(); + if (s1 !== peg$FAILED) { + peg$savedPos = peg$currPos; + s2 = peg$c249(s1); + if (s2) { + s2 = void 0; + } else { + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + s3 = peg$parse_(); + if (s3 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 123) { + s4 = peg$c35; + peg$currPos++; + } else { + s4 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c36); } + } + if (s4 !== peg$FAILED) { + s5 = peg$parsegeneric_func(); + if (s5 !== peg$FAILED) { + peg$savedPos = peg$currPos; + s6 = peg$c250(s1, s5); + if (s6) { + s6 = void 0; + } else { + s6 = peg$FAILED; + } + if (s6 !== peg$FAILED) { + s7 = peg$parse_(); + if (s7 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 125) { + s8 = peg$c37; + peg$currPos++; + } else { + s8 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c38); } + } + if (s8 !== peg$FAILED) { + s9 = peg$parse_(); + if (s9 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c251(s1, s5); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseCOLOR(); + if (s1 === peg$FAILED) { + s1 = peg$parseDEFINECOLOR(); + } + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c252(s1); + } + s0 = s1; + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 92) { + s1 = peg$c253; + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c254); } + } + if (s1 !== peg$FAILED) { + if (peg$c255.test(input.charAt(peg$currPos))) { + s2 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c256); } + } + if (s2 !== peg$FAILED) { + s3 = peg$parse_(); + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c257(s2); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (peg$c258.test(input.charAt(peg$currPos))) { + s1 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c259); } + } + if (s1 !== peg$FAILED) { + s2 = peg$parse_(); + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c229(s1); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (peg$c260.test(input.charAt(peg$currPos))) { + s1 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c261); } + } + if (s1 !== peg$FAILED) { + s2 = peg$parse_(); + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c262(s1); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + } + } + } + } + } + } + } + } + } + } + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + function peg$parseLITERALPART() { + var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9; + + var key = peg$currPos * 121 + 49, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + s0 = peg$currPos; + s1 = peg$parsegeneric_func(); + if (s1 !== peg$FAILED) { + peg$savedPos = peg$currPos; + s2 = peg$c230(s1); + if (s2) { + s2 = void 0; + } else { + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + s3 = peg$parse_(); + if (s3 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 40) { + s4 = peg$c231; + peg$currPos++; + } else { + s4 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c232); } + } + if (s4 === peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 91) { + s4 = peg$c111; + peg$currPos++; + } else { + s4 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c112); } + } + if (s4 === peg$FAILED) { + if (input.substr(peg$currPos, 2) === peg$c233) { + s4 = peg$c233; + peg$currPos += 2; + } else { + s4 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c234); } + } + if (s4 === peg$FAILED) { + s4 = peg$currPos; + s5 = peg$c50; + if (s5 !== peg$FAILED) { + peg$savedPos = s4; + s5 = peg$c235(s1); + } + s4 = s5; + } + } + } + if (s4 !== peg$FAILED) { + s5 = peg$parse_(); + if (s5 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c236(s1, s4); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parsegeneric_func(); + if (s1 !== peg$FAILED) { + peg$savedPos = peg$currPos; + s2 = peg$c237(s1); + if (s2) { + s2 = void 0; + } else { + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + s3 = peg$parse_(); + if (s3 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 40) { + s4 = peg$c231; + peg$currPos++; + } else { + s4 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c232); } + } + if (s4 === peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 91) { + s4 = peg$c111; + peg$currPos++; + } else { + s4 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c112); } + } + if (s4 === peg$FAILED) { + if (input.substr(peg$currPos, 2) === peg$c233) { + s4 = peg$c233; + peg$currPos += 2; + } else { + s4 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c234); } + } + if (s4 === peg$FAILED) { + s4 = peg$currPos; + s5 = peg$c50; + if (s5 !== peg$FAILED) { + peg$savedPos = s4; + s5 = peg$c238(s1); + } + s4 = s5; + } + } + } + if (s4 !== peg$FAILED) { + s5 = peg$parse_(); + if (s5 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c239(s1, s4); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parsegeneric_func(); + if (s1 !== peg$FAILED) { + peg$savedPos = peg$currPos; + s2 = peg$c240(s1); + if (s2) { + s2 = void 0; + } else { + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + s3 = peg$parse_(); + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c241(s1); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parsegeneric_func(); + if (s1 !== peg$FAILED) { + peg$savedPos = peg$currPos; + s2 = peg$c247(s1); + if (s2) { + s2 = void 0; + } else { + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + s3 = peg$parse_(); + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c248(s1); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parsegeneric_func(); + if (s1 !== peg$FAILED) { + peg$savedPos = peg$currPos; + s2 = peg$c249(s1); + if (s2) { + s2 = void 0; + } else { + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + s3 = peg$parse_(); + if (s3 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 123) { + s4 = peg$c35; + peg$currPos++; + } else { + s4 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c36); } + } + if (s4 !== peg$FAILED) { + s5 = peg$parsegeneric_func(); + if (s5 !== peg$FAILED) { + peg$savedPos = peg$currPos; + s6 = peg$c250(s1, s5); + if (s6) { + s6 = void 0; + } else { + s6 = peg$FAILED; + } + if (s6 !== peg$FAILED) { + s7 = peg$parse_(); + if (s7 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 125) { + s8 = peg$c37; + peg$currPos++; + } else { + s8 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c38); } + } + if (s8 !== peg$FAILED) { + s9 = peg$parse_(); + if (s9 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c251(s1, s5); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parsegeneric_func(); + if (s1 !== peg$FAILED) { + peg$savedPos = peg$currPos; + s2 = peg$c96(s1); + if (s2) { + s2 = void 0; + } else { + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + s3 = peg$parse_(); + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c263(s1); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseCOLOR(); + if (s1 === peg$FAILED) { + s1 = peg$parseDEFINECOLOR(); + } + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c252(s1); + } + s0 = s1; + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 92) { + s1 = peg$c253; + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c254); } + } + if (s1 !== peg$FAILED) { + if (peg$c255.test(input.charAt(peg$currPos))) { + s2 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c256); } + } + if (s2 !== peg$FAILED) { + s3 = peg$parse_(); + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c257(s2); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (peg$c258.test(input.charAt(peg$currPos))) { + s1 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c259); } + } + if (s1 !== peg$FAILED) { + s2 = peg$parse_(); + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c229(s1); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (peg$c260.test(input.charAt(peg$currPos))) { + s1 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c261); } + } + if (s1 !== peg$FAILED) { + s2 = peg$parse_(); + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c262(s1); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + } + } + } + } + } + } + } + } + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + function peg$parseDELIMITER() { + var s0, s1, s2, s3; + + var key = peg$currPos * 121 + 50, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + s0 = peg$currPos; + s1 = peg$parsedelimiter_uf_lt(); + if (s1 === peg$FAILED) { + s1 = peg$parsedelimiter_uf_op(); + if (s1 === peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 91) { + s1 = peg$c111; + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c112); } + } + } + } + if (s1 !== peg$FAILED) { + s2 = peg$parse_(); + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c229(s1); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 92) { + s1 = peg$c253; + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c254); } + } + if (s1 !== peg$FAILED) { + if (peg$c264.test(input.charAt(peg$currPos))) { + s2 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c265); } + } + if (s2 !== peg$FAILED) { + s3 = peg$parse_(); + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c257(s2); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parsegeneric_func(); + if (s1 !== peg$FAILED) { + peg$savedPos = peg$currPos; + s2 = peg$c266(s1); + if (s2) { + s2 = void 0; + } else { + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + s3 = peg$parse_(); + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c241(s1); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parsegeneric_func(); + if (s1 !== peg$FAILED) { + peg$savedPos = peg$currPos; + s2 = peg$c267(s1); + if (s2) { + s2 = void 0; + } else { + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + s3 = peg$parse_(); + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c268(s1); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseatsymbol(); + if (s1 !== peg$FAILED) { + s2 = peg$parse_(); + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c269(s1); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + } + } + } + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + function peg$parseFUN_AR1nb() { + var s0, s1, s2, s3, s4; + + var key = peg$currPos * 121 + 51, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + s0 = peg$currPos; + s1 = peg$parsegeneric_func(); + if (s1 !== peg$FAILED) { + peg$savedPos = peg$currPos; + s2 = peg$c270(s1); + if (s2) { + s2 = void 0; + } else { + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + s3 = []; + s4 = peg$parsespace(); + while (s4 !== peg$FAILED) { + s3.push(s4); + s4 = peg$parsespace(); + } + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c271(s1); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + function peg$parseFUN_AR1opt() { + var s0, s1, s2, s3, s4, s5, s6; + + var key = peg$currPos * 121 + 52, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + s0 = peg$currPos; + s1 = peg$parsegeneric_func(); + if (s1 !== peg$FAILED) { + peg$savedPos = peg$currPos; + s2 = peg$c272(s1); + if (s2) { + s2 = void 0; + } else { + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + s3 = []; + s4 = peg$parsespace(); + while (s4 !== peg$FAILED) { + s3.push(s4); + s4 = peg$parsespace(); + } + if (s3 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 91) { + s4 = peg$c111; + peg$currPos++; + } else { + s4 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c112); } + } + if (s4 !== peg$FAILED) { + s5 = []; + s6 = peg$parsespace(); + while (s6 !== peg$FAILED) { + s5.push(s6); + s6 = peg$parsespace(); + } + if (s5 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c271(s1); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + function peg$parseNEXT_CELL() { + var s0, s1, s2; + + var key = peg$currPos * 121 + 53, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 38) { + s1 = peg$c273; + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c274); } + } + if (s1 !== peg$FAILED) { + s2 = peg$parse_(); + if (s2 !== peg$FAILED) { + s1 = [s1, s2]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + function peg$parseNEXT_ROW() { + var s0, s1, s2; + + var key = peg$currPos * 121 + 54, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + s0 = peg$currPos; + if (input.substr(peg$currPos, 2) === peg$c275) { + s1 = peg$c275; + peg$currPos += 2; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c276); } + } + if (s1 !== peg$FAILED) { + s2 = peg$parse_(); + if (s2 !== peg$FAILED) { + s1 = [s1, s2]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + function peg$parseBEGIN() { + var s0, s1, s2; + + var key = peg$currPos * 121 + 55, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + s0 = peg$currPos; + if (input.substr(peg$currPos, 6) === peg$c277) { + s1 = peg$c277; + peg$currPos += 6; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c278); } + } + if (s1 !== peg$FAILED) { + s2 = peg$parse_(); + if (s2 !== peg$FAILED) { + s1 = [s1, s2]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + function peg$parseEND() { + var s0, s1, s2; + + var key = peg$currPos * 121 + 56, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + s0 = peg$currPos; + if (input.substr(peg$currPos, 4) === peg$c279) { + s1 = peg$c279; + peg$currPos += 4; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c280); } + } + if (s1 !== peg$FAILED) { + s2 = peg$parse_(); + if (s2 !== peg$FAILED) { + s1 = [s1, s2]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + function peg$parseBEGIN_MATRIX() { + var s0, s1, s2, s3; + + var key = peg$currPos * 121 + 57, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + s0 = peg$currPos; + s1 = peg$parseBEGIN(); + if (s1 !== peg$FAILED) { + if (input.substr(peg$currPos, 8) === peg$c281) { + s2 = peg$c281; + peg$currPos += 8; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c282); } + } + if (s2 !== peg$FAILED) { + s3 = peg$parse_(); + if (s3 !== peg$FAILED) { + s1 = [s1, s2, s3]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + function peg$parseEND_MATRIX() { + var s0, s1, s2, s3; + + var key = peg$currPos * 121 + 58, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + s0 = peg$currPos; + s1 = peg$parseEND(); + if (s1 !== peg$FAILED) { + if (input.substr(peg$currPos, 8) === peg$c281) { + s2 = peg$c281; + peg$currPos += 8; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c282); } + } + if (s2 !== peg$FAILED) { + s3 = peg$parse_(); + if (s3 !== peg$FAILED) { + s1 = [s1, s2, s3]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + function peg$parseBEGIN_PMATRIX() { + var s0, s1, s2, s3; + + var key = peg$currPos * 121 + 59, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + s0 = peg$currPos; + s1 = peg$parseBEGIN(); + if (s1 !== peg$FAILED) { + if (input.substr(peg$currPos, 9) === peg$c283) { + s2 = peg$c283; + peg$currPos += 9; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c284); } + } + if (s2 !== peg$FAILED) { + s3 = peg$parse_(); + if (s3 !== peg$FAILED) { + s1 = [s1, s2, s3]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + function peg$parseEND_PMATRIX() { + var s0, s1, s2, s3; + + var key = peg$currPos * 121 + 60, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + s0 = peg$currPos; + s1 = peg$parseEND(); + if (s1 !== peg$FAILED) { + if (input.substr(peg$currPos, 9) === peg$c283) { + s2 = peg$c283; + peg$currPos += 9; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c284); } + } + if (s2 !== peg$FAILED) { + s3 = peg$parse_(); + if (s3 !== peg$FAILED) { + s1 = [s1, s2, s3]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + function peg$parseBEGIN_BMATRIX() { + var s0, s1, s2, s3; + + var key = peg$currPos * 121 + 61, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + s0 = peg$currPos; + s1 = peg$parseBEGIN(); + if (s1 !== peg$FAILED) { + if (input.substr(peg$currPos, 9) === peg$c285) { + s2 = peg$c285; + peg$currPos += 9; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c286); } + } + if (s2 !== peg$FAILED) { + s3 = peg$parse_(); + if (s3 !== peg$FAILED) { + s1 = [s1, s2, s3]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + function peg$parseEND_BMATRIX() { + var s0, s1, s2, s3; + + var key = peg$currPos * 121 + 62, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + s0 = peg$currPos; + s1 = peg$parseEND(); + if (s1 !== peg$FAILED) { + if (input.substr(peg$currPos, 9) === peg$c285) { + s2 = peg$c285; + peg$currPos += 9; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c286); } + } + if (s2 !== peg$FAILED) { + s3 = peg$parse_(); + if (s3 !== peg$FAILED) { + s1 = [s1, s2, s3]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + function peg$parseBEGIN_BBMATRIX() { + var s0, s1, s2, s3; + + var key = peg$currPos * 121 + 63, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + s0 = peg$currPos; + s1 = peg$parseBEGIN(); + if (s1 !== peg$FAILED) { + if (input.substr(peg$currPos, 9) === peg$c287) { + s2 = peg$c287; + peg$currPos += 9; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c288); } + } + if (s2 !== peg$FAILED) { + s3 = peg$parse_(); + if (s3 !== peg$FAILED) { + s1 = [s1, s2, s3]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + function peg$parseEND_BBMATRIX() { + var s0, s1, s2, s3; + + var key = peg$currPos * 121 + 64, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + s0 = peg$currPos; + s1 = peg$parseEND(); + if (s1 !== peg$FAILED) { + if (input.substr(peg$currPos, 9) === peg$c287) { + s2 = peg$c287; + peg$currPos += 9; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c288); } + } + if (s2 !== peg$FAILED) { + s3 = peg$parse_(); + if (s3 !== peg$FAILED) { + s1 = [s1, s2, s3]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + function peg$parseBEGIN_VMATRIX() { + var s0, s1, s2, s3; + + var key = peg$currPos * 121 + 65, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + s0 = peg$currPos; + s1 = peg$parseBEGIN(); + if (s1 !== peg$FAILED) { + if (input.substr(peg$currPos, 9) === peg$c289) { + s2 = peg$c289; + peg$currPos += 9; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c290); } + } + if (s2 !== peg$FAILED) { + s3 = peg$parse_(); + if (s3 !== peg$FAILED) { + s1 = [s1, s2, s3]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + function peg$parseEND_VMATRIX() { + var s0, s1, s2, s3; + + var key = peg$currPos * 121 + 66, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + s0 = peg$currPos; + s1 = peg$parseEND(); + if (s1 !== peg$FAILED) { + if (input.substr(peg$currPos, 9) === peg$c289) { + s2 = peg$c289; + peg$currPos += 9; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c290); } + } + if (s2 !== peg$FAILED) { + s3 = peg$parse_(); + if (s3 !== peg$FAILED) { + s1 = [s1, s2, s3]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + function peg$parseBEGIN_VVMATRIX() { + var s0, s1, s2, s3; + + var key = peg$currPos * 121 + 67, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + s0 = peg$currPos; + s1 = peg$parseBEGIN(); + if (s1 !== peg$FAILED) { + if (input.substr(peg$currPos, 9) === peg$c291) { + s2 = peg$c291; + peg$currPos += 9; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c292); } + } + if (s2 !== peg$FAILED) { + s3 = peg$parse_(); + if (s3 !== peg$FAILED) { + s1 = [s1, s2, s3]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + function peg$parseEND_VVMATRIX() { + var s0, s1, s2, s3; + + var key = peg$currPos * 121 + 68, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + s0 = peg$currPos; + s1 = peg$parseEND(); + if (s1 !== peg$FAILED) { + if (input.substr(peg$currPos, 9) === peg$c291) { + s2 = peg$c291; + peg$currPos += 9; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c292); } + } + if (s2 !== peg$FAILED) { + s3 = peg$parse_(); + if (s3 !== peg$FAILED) { + s1 = [s1, s2, s3]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + function peg$parseBEGIN_ARRAY() { + var s0, s1, s2, s3; + + var key = peg$currPos * 121 + 69, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + s0 = peg$currPos; + s1 = peg$parseBEGIN(); + if (s1 !== peg$FAILED) { + if (input.substr(peg$currPos, 7) === peg$c293) { + s2 = peg$c293; + peg$currPos += 7; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c294); } + } + if (s2 !== peg$FAILED) { + s3 = peg$parse_(); + if (s3 !== peg$FAILED) { + s1 = [s1, s2, s3]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + function peg$parseEND_ARRAY() { + var s0, s1, s2, s3; + + var key = peg$currPos * 121 + 70, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + s0 = peg$currPos; + s1 = peg$parseEND(); + if (s1 !== peg$FAILED) { + if (input.substr(peg$currPos, 7) === peg$c293) { + s2 = peg$c293; + peg$currPos += 7; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c294); } + } + if (s2 !== peg$FAILED) { + s3 = peg$parse_(); + if (s3 !== peg$FAILED) { + s1 = [s1, s2, s3]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + function peg$parseBEGIN_ALIGN() { + var s0, s1, s2, s3; + + var key = peg$currPos * 121 + 71, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + s0 = peg$currPos; + s1 = peg$parseBEGIN(); + if (s1 !== peg$FAILED) { + if (input.substr(peg$currPos, 7) === peg$c295) { + s2 = peg$c295; + peg$currPos += 7; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c296); } + } + if (s2 !== peg$FAILED) { + s3 = peg$parse_(); + if (s3 !== peg$FAILED) { + s1 = [s1, s2, s3]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + function peg$parseEND_ALIGN() { + var s0, s1, s2, s3; + + var key = peg$currPos * 121 + 72, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + s0 = peg$currPos; + s1 = peg$parseEND(); + if (s1 !== peg$FAILED) { + if (input.substr(peg$currPos, 7) === peg$c295) { + s2 = peg$c295; + peg$currPos += 7; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c296); } + } + if (s2 !== peg$FAILED) { + s3 = peg$parse_(); + if (s3 !== peg$FAILED) { + s1 = [s1, s2, s3]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + function peg$parseBEGIN_ALIGNED() { + var s0, s1, s2, s3; + + var key = peg$currPos * 121 + 73, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + s0 = peg$currPos; + s1 = peg$parseBEGIN(); + if (s1 !== peg$FAILED) { + if (input.substr(peg$currPos, 9) === peg$c297) { + s2 = peg$c297; + peg$currPos += 9; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c298); } + } + if (s2 !== peg$FAILED) { + s3 = peg$parse_(); + if (s3 !== peg$FAILED) { + s1 = [s1, s2, s3]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + function peg$parseEND_ALIGNED() { + var s0, s1, s2, s3; + + var key = peg$currPos * 121 + 74, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + s0 = peg$currPos; + s1 = peg$parseEND(); + if (s1 !== peg$FAILED) { + if (input.substr(peg$currPos, 9) === peg$c297) { + s2 = peg$c297; + peg$currPos += 9; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c298); } + } + if (s2 !== peg$FAILED) { + s3 = peg$parse_(); + if (s3 !== peg$FAILED) { + s1 = [s1, s2, s3]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + function peg$parseBEGIN_ALIGNAT() { + var s0, s1, s2, s3; + + var key = peg$currPos * 121 + 75, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + s0 = peg$currPos; + s1 = peg$parseBEGIN(); + if (s1 !== peg$FAILED) { + if (input.substr(peg$currPos, 9) === peg$c299) { + s2 = peg$c299; + peg$currPos += 9; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c300); } + } + if (s2 !== peg$FAILED) { + s3 = peg$parse_(); + if (s3 !== peg$FAILED) { + s1 = [s1, s2, s3]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + function peg$parseEND_ALIGNAT() { + var s0, s1, s2, s3; + + var key = peg$currPos * 121 + 76, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + s0 = peg$currPos; + s1 = peg$parseEND(); + if (s1 !== peg$FAILED) { + if (input.substr(peg$currPos, 9) === peg$c299) { + s2 = peg$c299; + peg$currPos += 9; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c300); } + } + if (s2 !== peg$FAILED) { + s3 = peg$parse_(); + if (s3 !== peg$FAILED) { + s1 = [s1, s2, s3]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + function peg$parseBEGIN_ALIGNEDAT() { + var s0, s1, s2, s3; + + var key = peg$currPos * 121 + 77, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + s0 = peg$currPos; + s1 = peg$parseBEGIN(); + if (s1 !== peg$FAILED) { + if (input.substr(peg$currPos, 11) === peg$c301) { + s2 = peg$c301; + peg$currPos += 11; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c302); } + } + if (s2 !== peg$FAILED) { + s3 = peg$parse_(); + if (s3 !== peg$FAILED) { + s1 = [s1, s2, s3]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + function peg$parseEND_ALIGNEDAT() { + var s0, s1, s2, s3; + + var key = peg$currPos * 121 + 78, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + s0 = peg$currPos; + s1 = peg$parseEND(); + if (s1 !== peg$FAILED) { + if (input.substr(peg$currPos, 11) === peg$c301) { + s2 = peg$c301; + peg$currPos += 11; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c302); } + } + if (s2 !== peg$FAILED) { + s3 = peg$parse_(); + if (s3 !== peg$FAILED) { + s1 = [s1, s2, s3]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + function peg$parseBEGIN_SMALLMATRIX() { + var s0, s1, s2, s3; + + var key = peg$currPos * 121 + 79, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + s0 = peg$currPos; + s1 = peg$parseBEGIN(); + if (s1 !== peg$FAILED) { + if (input.substr(peg$currPos, 13) === peg$c303) { + s2 = peg$c303; + peg$currPos += 13; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c304); } + } + if (s2 !== peg$FAILED) { + s3 = peg$parse_(); + if (s3 !== peg$FAILED) { + s1 = [s1, s2, s3]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + function peg$parseEND_SMALLMATRIX() { + var s0, s1, s2, s3; + + var key = peg$currPos * 121 + 80, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + s0 = peg$currPos; + s1 = peg$parseEND(); + if (s1 !== peg$FAILED) { + if (input.substr(peg$currPos, 13) === peg$c303) { + s2 = peg$c303; + peg$currPos += 13; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c304); } + } + if (s2 !== peg$FAILED) { + s3 = peg$parse_(); + if (s3 !== peg$FAILED) { + s1 = [s1, s2, s3]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + function peg$parseBEGIN_CASES() { + var s0, s1, s2, s3; + + var key = peg$currPos * 121 + 81, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + s0 = peg$currPos; + s1 = peg$parseBEGIN(); + if (s1 !== peg$FAILED) { + if (input.substr(peg$currPos, 7) === peg$c305) { + s2 = peg$c305; + peg$currPos += 7; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c306); } + } + if (s2 !== peg$FAILED) { + s3 = peg$parse_(); + if (s3 !== peg$FAILED) { + s1 = [s1, s2, s3]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + function peg$parseEND_CASES() { + var s0, s1, s2, s3; + + var key = peg$currPos * 121 + 82, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + s0 = peg$currPos; + s1 = peg$parseEND(); + if (s1 !== peg$FAILED) { + if (input.substr(peg$currPos, 7) === peg$c305) { + s2 = peg$c305; + peg$currPos += 7; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c306); } + } + if (s2 !== peg$FAILED) { + s3 = peg$parse_(); + if (s3 !== peg$FAILED) { + s1 = [s1, s2, s3]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + function peg$parseBEGIN_MULTLINE() { + var s0, s1, s2, s3; + + var key = peg$currPos * 121 + 83, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + s0 = peg$currPos; + s1 = peg$parseBEGIN(); + if (s1 !== peg$FAILED) { + if (input.substr(peg$currPos, 10) === peg$c307) { + s2 = peg$c307; + peg$currPos += 10; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c308); } + } + if (s2 !== peg$FAILED) { + s3 = peg$parse_(); + if (s3 !== peg$FAILED) { + s1 = [s1, s2, s3]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + function peg$parseEND_MULTLINE() { + var s0, s1, s2, s3; + + var key = peg$currPos * 121 + 84, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + s0 = peg$currPos; + s1 = peg$parseEND(); + if (s1 !== peg$FAILED) { + if (input.substr(peg$currPos, 10) === peg$c307) { + s2 = peg$c307; + peg$currPos += 10; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c308); } + } + if (s2 !== peg$FAILED) { + s3 = peg$parse_(); + if (s3 !== peg$FAILED) { + s1 = [s1, s2, s3]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + function peg$parseBEGIN_MULTLINE_STAR() { + var s0, s1, s2, s3; + + var key = peg$currPos * 121 + 85, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + s0 = peg$currPos; + s1 = peg$parseBEGIN(); + if (s1 !== peg$FAILED) { + if (input.substr(peg$currPos, 11) === peg$c309) { + s2 = peg$c309; + peg$currPos += 11; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c310); } + } + if (s2 !== peg$FAILED) { + s3 = peg$parse_(); + if (s3 !== peg$FAILED) { + s1 = [s1, s2, s3]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + function peg$parseEND_MULTLINE_STAR() { + var s0, s1, s2, s3; + + var key = peg$currPos * 121 + 86, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + s0 = peg$currPos; + s1 = peg$parseEND(); + if (s1 !== peg$FAILED) { + if (input.substr(peg$currPos, 11) === peg$c309) { + s2 = peg$c309; + peg$currPos += 11; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c310); } + } + if (s2 !== peg$FAILED) { + s3 = peg$parse_(); + if (s3 !== peg$FAILED) { + s1 = [s1, s2, s3]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + function peg$parseSQ_CLOSE() { + var s0, s1, s2; + + var key = peg$currPos * 121 + 87, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 93) { + s1 = peg$c113; + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c114); } + } + if (s1 !== peg$FAILED) { + s2 = peg$parse_(); + if (s2 !== peg$FAILED) { + s1 = [s1, s2]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + function peg$parseCURLY_OPEN() { + var s0, s1, s2; + + var key = peg$currPos * 121 + 88, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 123) { + s1 = peg$c35; + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c36); } + } + if (s1 !== peg$FAILED) { + s2 = peg$parse_(); + if (s2 !== peg$FAILED) { + s1 = [s1, s2]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + function peg$parseCURLY_CLOSE() { + var s0, s1, s2; + + var key = peg$currPos * 121 + 89, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 125) { + s1 = peg$c37; + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c38); } + } + if (s1 !== peg$FAILED) { + s2 = peg$parse_(); + if (s2 !== peg$FAILED) { + s1 = [s1, s2]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + function peg$parsePAREN_OPEN() { + var s0, s1, s2; + + var key = peg$currPos * 121 + 90, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 40) { + s1 = peg$c231; + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c232); } + } + if (s1 !== peg$FAILED) { + s2 = peg$parse_(); + if (s2 !== peg$FAILED) { + s1 = [s1, s2]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.substr(peg$currPos, 5) === peg$c311) { + s1 = peg$c311; + peg$currPos += 5; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c312); } + } + if (s1 !== peg$FAILED) { + s2 = peg$parse_(); + if (s2 !== peg$FAILED) { + s1 = [s1, s2]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.substr(peg$currPos, 5) === peg$c313) { + s1 = peg$c313; + peg$currPos += 5; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c314); } + } + if (s1 !== peg$FAILED) { + s2 = peg$parse_(); + if (s2 !== peg$FAILED) { + s1 = [s1, s2]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.substr(peg$currPos, 6) === peg$c315) { + s1 = peg$c315; + peg$currPos += 6; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c316); } + } + if (s1 !== peg$FAILED) { + s2 = peg$parse_(); + if (s2 !== peg$FAILED) { + s1 = [s1, s2]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.substr(peg$currPos, 6) === peg$c317) { + s1 = peg$c317; + peg$currPos += 6; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c318); } + } + if (s1 !== peg$FAILED) { + s2 = peg$parse_(); + if (s2 !== peg$FAILED) { + s1 = [s1, s2]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.substr(peg$currPos, 6) === peg$c319) { + s1 = peg$c319; + peg$currPos += 6; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c320); } + } + if (s1 !== peg$FAILED) { + s2 = peg$parse_(); + if (s2 !== peg$FAILED) { + s1 = [s1, s2]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.substr(peg$currPos, 6) === peg$c321) { + s1 = peg$c321; + peg$currPos += 6; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c322); } + } + if (s1 !== peg$FAILED) { + s2 = peg$parse_(); + if (s2 !== peg$FAILED) { + s1 = [s1, s2]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.substr(peg$currPos, 7) === peg$c323) { + s1 = peg$c323; + peg$currPos += 7; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c324); } + } + if (s1 !== peg$FAILED) { + s2 = peg$parse_(); + if (s2 !== peg$FAILED) { + s1 = [s1, s2]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.substr(peg$currPos, 7) === peg$c325) { + s1 = peg$c325; + peg$currPos += 7; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c326); } + } + if (s1 !== peg$FAILED) { + s2 = peg$parse_(); + if (s2 !== peg$FAILED) { + s1 = [s1, s2]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.substr(peg$currPos, 6) === peg$c327) { + s1 = peg$c327; + peg$currPos += 6; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c328); } + } + if (s1 !== peg$FAILED) { + s2 = peg$parse_(); + if (s2 !== peg$FAILED) { + s1 = [s1, s2]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + } + } + } + } + } + } + } + } + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + function peg$parsePAREN_CLOSE() { + var s0, s1, s2; + + var key = peg$currPos * 121 + 91, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 41) { + s1 = peg$c329; + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c330); } + } + if (s1 !== peg$FAILED) { + s2 = peg$parse_(); + if (s2 !== peg$FAILED) { + s1 = [s1, s2]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.substr(peg$currPos, 5) === peg$c331) { + s1 = peg$c331; + peg$currPos += 5; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c332); } + } + if (s1 !== peg$FAILED) { + s2 = peg$parse_(); + if (s2 !== peg$FAILED) { + s1 = [s1, s2]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.substr(peg$currPos, 5) === peg$c333) { + s1 = peg$c333; + peg$currPos += 5; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c334); } + } + if (s1 !== peg$FAILED) { + s2 = peg$parse_(); + if (s2 !== peg$FAILED) { + s1 = [s1, s2]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.substr(peg$currPos, 6) === peg$c335) { + s1 = peg$c335; + peg$currPos += 6; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c336); } + } + if (s1 !== peg$FAILED) { + s2 = peg$parse_(); + if (s2 !== peg$FAILED) { + s1 = [s1, s2]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.substr(peg$currPos, 6) === peg$c337) { + s1 = peg$c337; + peg$currPos += 6; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c338); } + } + if (s1 !== peg$FAILED) { + s2 = peg$parse_(); + if (s2 !== peg$FAILED) { + s1 = [s1, s2]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.substr(peg$currPos, 6) === peg$c339) { + s1 = peg$c339; + peg$currPos += 6; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c340); } + } + if (s1 !== peg$FAILED) { + s2 = peg$parse_(); + if (s2 !== peg$FAILED) { + s1 = [s1, s2]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.substr(peg$currPos, 6) === peg$c341) { + s1 = peg$c341; + peg$currPos += 6; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c342); } + } + if (s1 !== peg$FAILED) { + s2 = peg$parse_(); + if (s2 !== peg$FAILED) { + s1 = [s1, s2]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.substr(peg$currPos, 7) === peg$c343) { + s1 = peg$c343; + peg$currPos += 7; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c344); } + } + if (s1 !== peg$FAILED) { + s2 = peg$parse_(); + if (s2 !== peg$FAILED) { + s1 = [s1, s2]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.substr(peg$currPos, 7) === peg$c345) { + s1 = peg$c345; + peg$currPos += 7; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c346); } + } + if (s1 !== peg$FAILED) { + s2 = peg$parse_(); + if (s2 !== peg$FAILED) { + s1 = [s1, s2]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + if (input.substr(peg$currPos, 7) === peg$c347) { + s0 = peg$c347; + peg$currPos += 7; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c348); } + } + } + } + } + } + } + } + } + } + } + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + function peg$parseSUP() { + var s0, s1, s2; + + var key = peg$currPos * 121 + 92, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 94) { + s1 = peg$c70; + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c71); } + } + if (s1 !== peg$FAILED) { + s2 = peg$parse_(); + if (s2 !== peg$FAILED) { + s1 = [s1, s2]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + function peg$parseSUB() { + var s0, s1, s2; + + var key = peg$currPos * 121 + 93, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 95) { + s1 = peg$c84; + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c85); } + } + if (s1 !== peg$FAILED) { + s2 = peg$parse_(); + if (s2 !== peg$FAILED) { + s1 = [s1, s2]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + function peg$parsegeneric_func() { + var s0, s1, s2, s3; + + var key = peg$currPos * 121 + 94, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 92) { + s1 = peg$c253; + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c254); } + } + if (s1 !== peg$FAILED) { + s2 = []; + s3 = peg$parsealpha(); + if (s3 !== peg$FAILED) { + while (s3 !== peg$FAILED) { + s2.push(s3); + s3 = peg$parsealpha(); + } + } else { + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c159(); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + function peg$parseBIG() { + var s0, s1, s2, s3; + + var key = peg$currPos * 121 + 95, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + s0 = peg$currPos; + s1 = peg$parsegeneric_func(); + if (s1 !== peg$FAILED) { + peg$savedPos = peg$currPos; + s2 = peg$c349(s1); + if (s2) { + s2 = void 0; + } else { + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + s3 = peg$parse_(); + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c271(s1); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + function peg$parsePAREN() { + var s0, s1, s2, s3, s4; + + var key = peg$currPos * 121 + 96, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + s0 = peg$currPos; + s1 = peg$parsegeneric_func(); + if (s1 !== peg$FAILED) { + peg$savedPos = peg$currPos; + s2 = peg$c350(s1); + if (s2) { + s2 = void 0; + } else { + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + s3 = []; + s4 = peg$parsespace(); + while (s4 !== peg$FAILED) { + s3.push(s4); + s4 = peg$parsespace(); + } + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c271(s1); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + function peg$parseFUN_AR1() { + var s0, s1, s2, s3, s4; + + var key = peg$currPos * 121 + 97, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + s0 = peg$currPos; + s1 = peg$parsegeneric_func(); + if (s1 !== peg$FAILED) { + peg$savedPos = peg$currPos; + s2 = peg$c351(s1); + if (s2) { + s2 = void 0; + } else { + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + s3 = []; + s4 = peg$parsespace(); + while (s4 !== peg$FAILED) { + s3.push(s4); + s4 = peg$parsespace(); + } + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c271(s1); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parsegeneric_func(); + if (s1 !== peg$FAILED) { + peg$savedPos = peg$currPos; + s2 = peg$c352(s1); + if (s2) { + s2 = void 0; + } else { + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + s3 = []; + s4 = peg$parsespace(); + while (s4 !== peg$FAILED) { + s3.push(s4); + s4 = peg$parsespace(); + } + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c352(s1); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + function peg$parseFUN_AR2() { + var s0, s1, s2, s3, s4; + + var key = peg$currPos * 121 + 98, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + s0 = peg$currPos; + s1 = peg$parsegeneric_func(); + if (s1 !== peg$FAILED) { + peg$savedPos = peg$currPos; + s2 = peg$c353(s1); + if (s2) { + s2 = void 0; + } else { + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + s3 = []; + s4 = peg$parsespace(); + while (s4 !== peg$FAILED) { + s3.push(s4); + s4 = peg$parsespace(); + } + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c271(s1); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + function peg$parseFUN_AR3() { + var s0, s1, s2, s3, s4; + + var key = peg$currPos * 121 + 99, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + s0 = peg$currPos; + s1 = peg$parsegeneric_func(); + if (s1 !== peg$FAILED) { + peg$savedPos = peg$currPos; + s2 = peg$c354(s1); + if (s2) { + s2 = void 0; + } else { + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + s3 = []; + s4 = peg$parsespace(); + while (s4 !== peg$FAILED) { + s3.push(s4); + s4 = peg$parsespace(); + } + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c271(s1); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + function peg$parseFUN_INFIX() { + var s0, s1, s2, s3; + + var key = peg$currPos * 121 + 100, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + s0 = peg$currPos; + s1 = peg$parsegeneric_func(); + if (s1 !== peg$FAILED) { + peg$savedPos = peg$currPos; + s2 = peg$c355(s1); + if (s2) { + s2 = void 0; + } else { + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + s3 = peg$parse_(); + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c271(s1); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + function peg$parseJACOBI() { + var s0, s1, s2, s3, s4; + + var key = peg$currPos * 121 + 101, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + s0 = peg$currPos; + s1 = peg$parsegeneric_func(); + if (s1 !== peg$FAILED) { + peg$savedPos = peg$currPos; + s2 = peg$c356(s1); + if (s2) { + s2 = void 0; + } else { + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + s3 = []; + s4 = peg$parsespace(); + while (s4 !== peg$FAILED) { + s3.push(s4); + s4 = peg$parsespace(); + } + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c271(s1); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + function peg$parseLAGUERRE() { + var s0, s1, s2, s3, s4; + + var key = peg$currPos * 121 + 102, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + s0 = peg$currPos; + s1 = peg$parsegeneric_func(); + if (s1 !== peg$FAILED) { + peg$savedPos = peg$currPos; + s2 = peg$c357(s1); + if (s2) { + s2 = void 0; + } else { + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + s3 = []; + s4 = peg$parsespace(); + while (s4 !== peg$FAILED) { + s3.push(s4); + s4 = peg$parsespace(); + } + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c271(s1); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + function peg$parseEJACOBI() { + var s0; + + var key = peg$currPos * 121 + 103, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + if (input.substr(peg$currPos, 2) === peg$c358) { + s0 = peg$c358; + peg$currPos += 2; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c359); } + } + if (s0 === peg$FAILED) { + if (input.substr(peg$currPos, 2) === peg$c360) { + s0 = peg$c360; + peg$currPos += 2; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c361); } + } + if (s0 === peg$FAILED) { + if (input.substr(peg$currPos, 2) === peg$c362) { + s0 = peg$c362; + peg$currPos += 2; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c363); } + } + } + } + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + function peg$parseDECLh() { + var s0, s1, s2, s3; + + var key = peg$currPos * 121 + 104, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + s0 = peg$currPos; + s1 = peg$parsegeneric_func(); + if (s1 !== peg$FAILED) { + peg$savedPos = peg$currPos; + s2 = peg$c364(s1); + if (s2) { + s2 = void 0; + } else { + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + s3 = peg$parse_(); + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c365(s1); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + function peg$parseFUN_AR2nb() { + var s0, s1, s2, s3, s4; + + var key = peg$currPos * 121 + 105, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + s0 = peg$currPos; + s1 = peg$parsegeneric_func(); + if (s1 !== peg$FAILED) { + peg$savedPos = peg$currPos; + s2 = peg$c366(s1); + if (s2) { + s2 = void 0; + } else { + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + s3 = []; + s4 = peg$parsespace(); + while (s4 !== peg$FAILED) { + s3.push(s4); + s4 = peg$parsespace(); + } + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c271(s1); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + function peg$parseLEFT() { + var s0, s1, s2, s3; + + var key = peg$currPos * 121 + 106, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + s0 = peg$currPos; + s1 = peg$parsegeneric_func(); + if (s1 !== peg$FAILED) { + peg$savedPos = peg$currPos; + s2 = peg$c367(s1); + if (s2) { + s2 = void 0; + } else { + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + s3 = peg$parse_(); + if (s3 !== peg$FAILED) { + s1 = [s1, s2, s3]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + function peg$parseRIGHT() { + var s0, s1, s2, s3; + + var key = peg$currPos * 121 + 107, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + s0 = peg$currPos; + s1 = peg$parsegeneric_func(); + if (s1 !== peg$FAILED) { + peg$savedPos = peg$currPos; + s2 = peg$c368(s1); + if (s2) { + s2 = void 0; + } else { + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + s3 = peg$parse_(); + if (s3 !== peg$FAILED) { + s1 = [s1, s2, s3]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + function peg$parseHLINE() { + var s0, s1, s2, s3; + + var key = peg$currPos * 121 + 108, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + s0 = peg$currPos; + s1 = peg$parsegeneric_func(); + if (s1 !== peg$FAILED) { + peg$savedPos = peg$currPos; + s2 = peg$c369(s1); + if (s2) { + s2 = void 0; + } else { + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + s3 = peg$parse_(); + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c271(s1); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + function peg$parseCOLOR() { + var s0, s1, s2, s3, s4; + + var key = peg$currPos * 121 + 109, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + s0 = peg$currPos; + s1 = peg$parsegeneric_func(); + if (s1 !== peg$FAILED) { + peg$savedPos = peg$currPos; + s2 = peg$c370(s1); + if (s2) { + s2 = void 0; + } else { + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + s3 = peg$parse_(); + if (s3 !== peg$FAILED) { + s4 = peg$parseCOLOR_SPEC(); + if (s4 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c371(s1, s4); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + function peg$parseDEFINECOLOR() { + var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, s14, s15, s16, s17; + + var key = peg$currPos * 121 + 110, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + s0 = peg$currPos; + s1 = peg$parsegeneric_func(); + if (s1 !== peg$FAILED) { + peg$savedPos = peg$currPos; + s2 = peg$c372(s1); + if (s2) { + s2 = void 0; + } else { + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + s3 = peg$parse_(); + if (s3 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 123) { + s4 = peg$c35; + peg$currPos++; + } else { + s4 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c36); } + } + if (s4 !== peg$FAILED) { + s5 = peg$parse_(); + if (s5 !== peg$FAILED) { + s6 = []; + s7 = peg$parsealpha(); + if (s7 !== peg$FAILED) { + while (s7 !== peg$FAILED) { + s6.push(s7); + s7 = peg$parsealpha(); + } + } else { + s6 = peg$FAILED; + } + if (s6 !== peg$FAILED) { + s7 = peg$parse_(); + if (s7 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 125) { + s8 = peg$c37; + peg$currPos++; + } else { + s8 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c38); } + } + if (s8 !== peg$FAILED) { + s9 = peg$parse_(); + if (s9 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 123) { + s10 = peg$c35; + peg$currPos++; + } else { + s10 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c36); } + } + if (s10 !== peg$FAILED) { + s11 = peg$parse_(); + if (s11 !== peg$FAILED) { + s12 = peg$currPos; + if (input.substr(peg$currPos, 5).toLowerCase() === peg$c373) { + s13 = input.substr(peg$currPos, 5); + peg$currPos += 5; + } else { + s13 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c374); } + } + if (s13 !== peg$FAILED) { + s14 = peg$parse_(); + if (s14 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 125) { + s15 = peg$c37; + peg$currPos++; + } else { + s15 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c38); } + } + if (s15 !== peg$FAILED) { + s16 = peg$parse_(); + if (s16 !== peg$FAILED) { + s17 = peg$parseCOLOR_SPEC_NAMED(); + if (s17 !== peg$FAILED) { + peg$savedPos = s12; + s13 = peg$c375(s1, s6, s17); + s12 = s13; + } else { + peg$currPos = s12; + s12 = peg$FAILED; + } + } else { + peg$currPos = s12; + s12 = peg$FAILED; + } + } else { + peg$currPos = s12; + s12 = peg$FAILED; + } + } else { + peg$currPos = s12; + s12 = peg$FAILED; + } + } else { + peg$currPos = s12; + s12 = peg$FAILED; + } + if (s12 === peg$FAILED) { + s12 = peg$currPos; + if (input.substr(peg$currPos, 4).toLowerCase() === peg$c376) { + s13 = input.substr(peg$currPos, 4); + peg$currPos += 4; + } else { + s13 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c377); } + } + if (s13 !== peg$FAILED) { + s14 = peg$parse_(); + if (s14 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 125) { + s15 = peg$c37; + peg$currPos++; + } else { + s15 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c38); } + } + if (s15 !== peg$FAILED) { + s16 = peg$parse_(); + if (s16 !== peg$FAILED) { + s17 = peg$parseCOLOR_SPEC_GRAY(); + if (s17 !== peg$FAILED) { + peg$savedPos = s12; + s13 = peg$c378(s1, s6, s17); + s12 = s13; + } else { + peg$currPos = s12; + s12 = peg$FAILED; + } + } else { + peg$currPos = s12; + s12 = peg$FAILED; + } + } else { + peg$currPos = s12; + s12 = peg$FAILED; + } + } else { + peg$currPos = s12; + s12 = peg$FAILED; + } + } else { + peg$currPos = s12; + s12 = peg$FAILED; + } + if (s12 === peg$FAILED) { + s12 = peg$currPos; + if (input.substr(peg$currPos, 3) === peg$c379) { + s13 = peg$c379; + peg$currPos += 3; + } else { + s13 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c380); } + } + if (s13 !== peg$FAILED) { + s14 = peg$parse_(); + if (s14 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 125) { + s15 = peg$c37; + peg$currPos++; + } else { + s15 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c38); } + } + if (s15 !== peg$FAILED) { + s16 = peg$parse_(); + if (s16 !== peg$FAILED) { + s17 = peg$parseCOLOR_SPEC_rgb(); + if (s17 !== peg$FAILED) { + peg$savedPos = s12; + s13 = peg$c381(s1, s6, s17); + s12 = s13; + } else { + peg$currPos = s12; + s12 = peg$FAILED; + } + } else { + peg$currPos = s12; + s12 = peg$FAILED; + } + } else { + peg$currPos = s12; + s12 = peg$FAILED; + } + } else { + peg$currPos = s12; + s12 = peg$FAILED; + } + } else { + peg$currPos = s12; + s12 = peg$FAILED; + } + if (s12 === peg$FAILED) { + s12 = peg$currPos; + if (input.substr(peg$currPos, 3) === peg$c382) { + s13 = peg$c382; + peg$currPos += 3; + } else { + s13 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c383); } + } + if (s13 !== peg$FAILED) { + s14 = peg$parse_(); + if (s14 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 125) { + s15 = peg$c37; + peg$currPos++; + } else { + s15 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c38); } + } + if (s15 !== peg$FAILED) { + s16 = peg$parse_(); + if (s16 !== peg$FAILED) { + s17 = peg$parseCOLOR_SPEC_RGB(); + if (s17 !== peg$FAILED) { + peg$savedPos = s12; + s13 = peg$c381(s1, s6, s17); + s12 = s13; + } else { + peg$currPos = s12; + s12 = peg$FAILED; + } + } else { + peg$currPos = s12; + s12 = peg$FAILED; + } + } else { + peg$currPos = s12; + s12 = peg$FAILED; + } + } else { + peg$currPos = s12; + s12 = peg$FAILED; + } + } else { + peg$currPos = s12; + s12 = peg$FAILED; + } + if (s12 === peg$FAILED) { + s12 = peg$currPos; + if (input.substr(peg$currPos, 4).toLowerCase() === peg$c384) { + s13 = input.substr(peg$currPos, 4); + peg$currPos += 4; + } else { + s13 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c385); } + } + if (s13 !== peg$FAILED) { + s14 = peg$parse_(); + if (s14 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 125) { + s15 = peg$c37; + peg$currPos++; + } else { + s15 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c38); } + } + if (s15 !== peg$FAILED) { + s16 = peg$parse_(); + if (s16 !== peg$FAILED) { + s17 = peg$parseCOLOR_SPEC_CMYK(); + if (s17 !== peg$FAILED) { + peg$savedPos = s12; + s13 = peg$c386(s1, s6, s17); + s12 = s13; + } else { + peg$currPos = s12; + s12 = peg$FAILED; + } + } else { + peg$currPos = s12; + s12 = peg$FAILED; + } + } else { + peg$currPos = s12; + s12 = peg$FAILED; + } + } else { + peg$currPos = s12; + s12 = peg$FAILED; + } + } else { + peg$currPos = s12; + s12 = peg$FAILED; + } + } + } + } + } + if (s12 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c387(s1, s6, s12); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + function peg$parseCOLOR_SPEC() { + var s0, s1, s2, s3, s4, s5, s6, s7; + + var key = peg$currPos * 121 + 111, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + s0 = peg$parseCOLOR_SPEC_NAMED(); + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 91) { + s1 = peg$c111; + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c112); } + } + if (s1 !== peg$FAILED) { + s2 = peg$parse_(); + if (s2 !== peg$FAILED) { + if (input.substr(peg$currPos, 5).toLowerCase() === peg$c373) { + s3 = input.substr(peg$currPos, 5); + peg$currPos += 5; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c374); } + } + if (s3 !== peg$FAILED) { + s4 = peg$parse_(); + if (s4 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 93) { + s5 = peg$c113; + peg$currPos++; + } else { + s5 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c114); } + } + if (s5 !== peg$FAILED) { + s6 = peg$parse_(); + if (s6 !== peg$FAILED) { + s7 = peg$parseCOLOR_SPEC_NAMED(); + if (s7 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c388(s7); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 91) { + s1 = peg$c111; + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c112); } + } + if (s1 !== peg$FAILED) { + s2 = peg$parse_(); + if (s2 !== peg$FAILED) { + if (input.substr(peg$currPos, 4).toLowerCase() === peg$c376) { + s3 = input.substr(peg$currPos, 4); + peg$currPos += 4; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c377); } + } + if (s3 !== peg$FAILED) { + s4 = peg$parse_(); + if (s4 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 93) { + s5 = peg$c113; + peg$currPos++; + } else { + s5 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c114); } + } + if (s5 !== peg$FAILED) { + s6 = peg$parse_(); + if (s6 !== peg$FAILED) { + s7 = peg$parseCOLOR_SPEC_GRAY(); + if (s7 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c389(s7); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 91) { + s1 = peg$c111; + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c112); } + } + if (s1 !== peg$FAILED) { + s2 = peg$parse_(); + if (s2 !== peg$FAILED) { + if (input.substr(peg$currPos, 3) === peg$c379) { + s3 = peg$c379; + peg$currPos += 3; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c380); } + } + if (s3 !== peg$FAILED) { + s4 = peg$parse_(); + if (s4 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 93) { + s5 = peg$c113; + peg$currPos++; + } else { + s5 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c114); } + } + if (s5 !== peg$FAILED) { + s6 = peg$parse_(); + if (s6 !== peg$FAILED) { + s7 = peg$parseCOLOR_SPEC_rgb(); + if (s7 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c390(s7); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 91) { + s1 = peg$c111; + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c112); } + } + if (s1 !== peg$FAILED) { + s2 = peg$parse_(); + if (s2 !== peg$FAILED) { + if (input.substr(peg$currPos, 3) === peg$c382) { + s3 = peg$c382; + peg$currPos += 3; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c383); } + } + if (s3 !== peg$FAILED) { + s4 = peg$parse_(); + if (s4 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 93) { + s5 = peg$c113; + peg$currPos++; + } else { + s5 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c114); } + } + if (s5 !== peg$FAILED) { + s6 = peg$parse_(); + if (s6 !== peg$FAILED) { + s7 = peg$parseCOLOR_SPEC_RGB(); + if (s7 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c390(s7); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 91) { + s1 = peg$c111; + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c112); } + } + if (s1 !== peg$FAILED) { + s2 = peg$parse_(); + if (s2 !== peg$FAILED) { + if (input.substr(peg$currPos, 4).toLowerCase() === peg$c384) { + s3 = input.substr(peg$currPos, 4); + peg$currPos += 4; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c385); } + } + if (s3 !== peg$FAILED) { + s4 = peg$parse_(); + if (s4 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 93) { + s5 = peg$c113; + peg$currPos++; + } else { + s5 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c114); } + } + if (s5 !== peg$FAILED) { + s6 = peg$parse_(); + if (s6 !== peg$FAILED) { + s7 = peg$parseCOLOR_SPEC_CMYK(); + if (s7 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c391(s7); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + } + } + } + } + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + function peg$parseCOLOR_SPEC_NAMED() { + var s0, s1, s2, s3, s4, s5, s6; + + var key = peg$currPos * 121 + 112, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 123) { + s1 = peg$c35; + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c36); } + } + if (s1 !== peg$FAILED) { + s2 = peg$parse_(); + if (s2 !== peg$FAILED) { + s3 = []; + s4 = peg$parsealpha(); + if (s4 !== peg$FAILED) { + while (s4 !== peg$FAILED) { + s3.push(s4); + s4 = peg$parsealpha(); + } + } else { + s3 = peg$FAILED; + } + if (s3 !== peg$FAILED) { + s4 = peg$parse_(); + if (s4 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 125) { + s5 = peg$c37; + peg$currPos++; + } else { + s5 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c38); } + } + if (s5 !== peg$FAILED) { + s6 = peg$parse_(); + if (s6 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c392(s3); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + function peg$parseCOLOR_SPEC_GRAY() { + var s0, s1, s2, s3, s4; + + var key = peg$currPos * 121 + 113, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 123) { + s1 = peg$c35; + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c36); } + } + if (s1 !== peg$FAILED) { + s2 = peg$parse_(); + if (s2 !== peg$FAILED) { + s3 = []; + s4 = peg$parseCNUM(); + if (s4 !== peg$FAILED) { + while (s4 !== peg$FAILED) { + s3.push(s4); + s4 = peg$parseCNUM(); + } + } else { + s3 = peg$FAILED; + } + if (s3 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 125) { + s4 = peg$c37; + peg$currPos++; + } else { + s4 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c38); } + } + if (s4 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c393(s3); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + function peg$parseCOLOR_SPEC_rgb() { + var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11; + + var key = peg$currPos * 121 + 114, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 123) { + s1 = peg$c35; + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c36); } + } + if (s1 !== peg$FAILED) { + s2 = peg$parse_(); + if (s2 !== peg$FAILED) { + s3 = peg$parseCNUM(); + if (s3 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 44) { + s4 = peg$c72; + peg$currPos++; + } else { + s4 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c73); } + } + if (s4 !== peg$FAILED) { + s5 = peg$parse_(); + if (s5 !== peg$FAILED) { + s6 = peg$parseCNUM(); + if (s6 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 44) { + s7 = peg$c72; + peg$currPos++; + } else { + s7 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c73); } + } + if (s7 !== peg$FAILED) { + s8 = peg$parse_(); + if (s8 !== peg$FAILED) { + s9 = peg$parseCNUM(); + if (s9 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 125) { + s10 = peg$c37; + peg$currPos++; + } else { + s10 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c38); } + } + if (s10 !== peg$FAILED) { + s11 = peg$parse_(); + if (s11 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c394(s3, s6, s9); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + function peg$parseCOLOR_SPEC_RGB() { + var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11; + + var key = peg$currPos * 121 + 115, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 123) { + s1 = peg$c35; + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c36); } + } + if (s1 !== peg$FAILED) { + s2 = peg$parse_(); + if (s2 !== peg$FAILED) { + s3 = peg$parseCNUM255(); + if (s3 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 44) { + s4 = peg$c72; + peg$currPos++; + } else { + s4 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c73); } + } + if (s4 !== peg$FAILED) { + s5 = peg$parse_(); + if (s5 !== peg$FAILED) { + s6 = peg$parseCNUM255(); + if (s6 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 44) { + s7 = peg$c72; + peg$currPos++; + } else { + s7 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c73); } + } + if (s7 !== peg$FAILED) { + s8 = peg$parse_(); + if (s8 !== peg$FAILED) { + s9 = peg$parseCNUM255(); + if (s9 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 125) { + s10 = peg$c37; + peg$currPos++; + } else { + s10 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c38); } + } + if (s10 !== peg$FAILED) { + s11 = peg$parse_(); + if (s11 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c394(s3, s6, s9); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + function peg$parseCOLOR_SPEC_CMYK() { + var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, s14; + + var key = peg$currPos * 121 + 116, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 123) { + s1 = peg$c35; + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c36); } + } + if (s1 !== peg$FAILED) { + s2 = peg$parse_(); + if (s2 !== peg$FAILED) { + s3 = peg$parseCNUM(); + if (s3 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 44) { + s4 = peg$c72; + peg$currPos++; + } else { + s4 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c73); } + } + if (s4 !== peg$FAILED) { + s5 = peg$parse_(); + if (s5 !== peg$FAILED) { + s6 = peg$parseCNUM(); + if (s6 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 44) { + s7 = peg$c72; + peg$currPos++; + } else { + s7 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c73); } + } + if (s7 !== peg$FAILED) { + s8 = peg$parse_(); + if (s8 !== peg$FAILED) { + s9 = peg$parseCNUM(); + if (s9 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 44) { + s10 = peg$c72; + peg$currPos++; + } else { + s10 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c73); } + } + if (s10 !== peg$FAILED) { + s11 = peg$parse_(); + if (s11 !== peg$FAILED) { + s12 = peg$parseCNUM(); + if (s12 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 125) { + s13 = peg$c37; + peg$currPos++; + } else { + s13 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c38); } + } + if (s13 !== peg$FAILED) { + s14 = peg$parse_(); + if (s14 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c395(s3, s6, s9, s12); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + function peg$parseCNUM255() { + var s0, s1, s2, s3, s4, s5, s6; + + var key = peg$currPos * 121 + 117, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + s0 = peg$currPos; + s1 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 48) { + s2 = peg$c396; + peg$currPos++; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c397); } + } + if (s2 === peg$FAILED) { + s2 = peg$currPos; + if (peg$c398.test(input.charAt(peg$currPos))) { + s3 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c399); } + } + if (s3 !== peg$FAILED) { + s4 = peg$currPos; + if (peg$c167.test(input.charAt(peg$currPos))) { + s5 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s5 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c168); } + } + if (s5 !== peg$FAILED) { + if (peg$c167.test(input.charAt(peg$currPos))) { + s6 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s6 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c168); } + } + if (s6 === peg$FAILED) { + s6 = null; + } + if (s6 !== peg$FAILED) { + s5 = [s5, s6]; + s4 = s5; + } else { + peg$currPos = s4; + s4 = peg$FAILED; + } + } else { + peg$currPos = s4; + s4 = peg$FAILED; + } + if (s4 === peg$FAILED) { + s4 = null; + } + if (s4 !== peg$FAILED) { + s3 = [s3, s4]; + s2 = s3; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + } + if (s2 !== peg$FAILED) { + s1 = input.substring(s1, peg$currPos); + } else { + s1 = s2; + } + if (s1 !== peg$FAILED) { + peg$savedPos = peg$currPos; + s2 = peg$c400(s1); + if (s2) { + s2 = void 0; + } else { + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + s3 = peg$parse_(); + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c401(s1); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + function peg$parseCNUM() { + var s0, s1, s2, s3, s4, s5, s6; + + var key = peg$currPos * 121 + 118, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + s0 = peg$currPos; + s1 = peg$currPos; + s2 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 48) { + s3 = peg$c396; + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c397); } + } + if (s3 === peg$FAILED) { + s3 = null; + } + if (s3 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 46) { + s4 = peg$c190; + peg$currPos++; + } else { + s4 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c191); } + } + if (s4 !== peg$FAILED) { + s5 = []; + if (peg$c167.test(input.charAt(peg$currPos))) { + s6 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s6 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c168); } + } + if (s6 !== peg$FAILED) { + while (s6 !== peg$FAILED) { + s5.push(s6); + if (peg$c167.test(input.charAt(peg$currPos))) { + s6 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s6 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c168); } + } + } + } else { + s5 = peg$FAILED; + } + if (s5 !== peg$FAILED) { + s3 = [s3, s4, s5]; + s2 = s3; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + s1 = input.substring(s1, peg$currPos); + } else { + s1 = s2; + } + if (s1 !== peg$FAILED) { + s2 = peg$parse_(); + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c402(s1); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$currPos; + s2 = peg$currPos; + if (peg$c403.test(input.charAt(peg$currPos))) { + s3 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c404); } + } + if (s3 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 46) { + s4 = peg$c190; + peg$currPos++; + } else { + s4 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c191); } + } + if (s4 === peg$FAILED) { + s4 = null; + } + if (s4 !== peg$FAILED) { + s3 = [s3, s4]; + s2 = s3; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + s1 = input.substring(s1, peg$currPos); + } else { + s1 = s2; + } + if (s1 !== peg$FAILED) { + s2 = peg$parse_(); + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c402(s1); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + function peg$parseimpossible() { + var s0; + + var key = peg$currPos * 121 + 119, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + peg$savedPos = peg$currPos; + s0 = peg$c405(); + if (s0) { + s0 = void 0; + } else { + s0 = peg$FAILED; + } + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + function peg$parseEOF() { + var s0; + + var key = peg$currPos * 121 + 120, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + peg$savedPos = peg$currPos; + s0 = peg$c406(); + if (s0) { + s0 = void 0; + } else { + s0 = peg$FAILED; + } + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + + var ast = require('./ast'); + var tu = require('./texutil'); + + var sq_close_ri = ast.RenderT.HTMLABLEC(ast.FontClass.UFH(), "]", "]"); + + var lst2arr = function(l) { + var arr = []; + while (l !== null) { + arr.push(l.head); + l = l.tail; + } + return arr; + }; + + + peg$result = peg$startRuleFunction(); + + if (peg$result !== peg$FAILED && peg$currPos === input.length) { + return peg$result; + } else { + if (peg$result !== peg$FAILED && peg$currPos < input.length) { + peg$fail({ type: "end", description: "end of input" }); + } + + throw peg$buildException( + null, + peg$maxFailExpected, + peg$maxFailPos < input.length ? input.charAt(peg$maxFailPos) : null, + peg$maxFailPos < input.length ? + peg$computeLocation(peg$maxFailPos, peg$maxFailPos + 1) : + peg$computeLocation(peg$maxFailPos, peg$maxFailPos) + ); + } + } + + return { + SyntaxError: peg$SyntaxError, + parse: peg$parse + }; +})(); \ No newline at end of file From 37abb53f7420b2f16307add356191b2ad8b8cab3 Mon Sep 17 00:00:00 2001 From: Jagan Prem Date: Mon, 22 Aug 2016 11:10:47 -0400 Subject: [PATCH 04/10] Fix failing dependency --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f75dd93..cf5f2e8 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ "devDependencies": { "jshint": "~2.9.1", "mocha": "~3.0.2", - "pegjs": "~0.9.0", + "pegjs": "~0.10.0", "balanced-match": "~0.4.2" }, "bin": { From 5c2b5565ebeeb94cd7457f825dafc72e2e18c70b Mon Sep 17 00:00:00 2001 From: Jagan Prem Date: Mon, 22 Aug 2016 11:18:33 -0400 Subject: [PATCH 05/10] Change builder to reflect pegJS 0.10.0 --- lib/build-parser.js | 2 +- lib/parser.js | 504 ++++++++++++++++++++++++-------------------- 2 files changed, 280 insertions(+), 226 deletions(-) diff --git a/lib/build-parser.js b/lib/build-parser.js index 7f55518..57804ee 100644 --- a/lib/build-parser.js +++ b/lib/build-parser.js @@ -8,7 +8,7 @@ var buildParser = module.exports = function(inFile, outFile) { var PEG = require('pegjs'); var fs = require('fs'); - var parserSource = PEG.buildParser(fs.readFileSync(inFile, 'utf8'), { + var parserSource = PEG.generate(fs.readFileSync(inFile, 'utf8'), { /* PEGJS options */ output: "source", cache: true,// makes repeated calls to generic_func production efficient diff --git a/lib/parser.js b/lib/parser.js index 721a7b0..d37d980 100644 --- a/lib/parser.js +++ b/lib/parser.js @@ -1,13 +1,12 @@ /* jshint latedef: false */ -module.exports = (function() { +module.exports = /* + * Generated by PEG.js 0.10.0. + * + * http://pegjs.org/ + */ +(function() { "use strict"; - /* - * Generated by PEG.js 0.9.0. - * - * http://pegjs.org/ - */ - function peg$subclass(child, parent) { /*jshint validthis:true, newcap:false*/ function ctor() { this.constructor = child; } @@ -30,63 +29,168 @@ module.exports = (function() { peg$subclass(peg$SyntaxError, Error); - function peg$parse(input) { - /*jshint validthis:true, newcap:false*/ - var options = arguments.length > 1 ? arguments[1] : {}, - parser = this, + peg$SyntaxError.buildMessage = function(expected, found) { + var DESCRIBE_EXPECTATION_FNS = { + literal: function(expectation) { + return "\"" + literalEscape(expectation.text) + "\""; + }, + + "class": function(expectation) { + var escapedParts = "", + i; + + for (i = 0; i < expectation.parts.length; i++) { + escapedParts += expectation.parts[i] instanceof Array + ? classEscape(expectation.parts[i][0]) + "-" + classEscape(expectation.parts[i][1]) + : classEscape(expectation.parts[i]); + } + + return "[" + (expectation.inverted ? "^" : "") + escapedParts + "]"; + }, + + any: function(expectation) { + return "any character"; + }, + + end: function(expectation) { + return "end of input"; + }, + + other: function(expectation) { + return expectation.description; + } + }; + + function hex(ch) { + return ch.charCodeAt(0).toString(16).toUpperCase(); + } + + function literalEscape(s) { + return s + .replace(/\\/g, '\\\\') + .replace(/"/g, '\\"') + .replace(/\0/g, '\\0') + .replace(/\t/g, '\\t') + .replace(/\n/g, '\\n') + .replace(/\r/g, '\\r') + .replace(/[\x00-\x0F]/g, function(ch) { return '\\x0' + hex(ch); }) + .replace(/[\x10-\x1F\x7F-\x9F]/g, function(ch) { return '\\x' + hex(ch); }); + } + + function classEscape(s) { + return s + .replace(/\\/g, '\\\\') + .replace(/\]/g, '\\]') + .replace(/\^/g, '\\^') + .replace(/-/g, '\\-') + .replace(/\0/g, '\\0') + .replace(/\t/g, '\\t') + .replace(/\n/g, '\\n') + .replace(/\r/g, '\\r') + .replace(/[\x00-\x0F]/g, function(ch) { return '\\x0' + hex(ch); }) + .replace(/[\x10-\x1F\x7F-\x9F]/g, function(ch) { return '\\x' + hex(ch); }); + } + + function describeExpectation(expectation) { + return DESCRIBE_EXPECTATION_FNS[expectation.type](expectation); + } + + function describeExpected(expected) { + var descriptions = new Array(expected.length), + i, j; + + for (i = 0; i < expected.length; i++) { + descriptions[i] = describeExpectation(expected[i]); + } + + descriptions.sort(); + + if (descriptions.length > 0) { + for (i = 1, j = 1; i < descriptions.length; i++) { + if (descriptions[i - 1] !== descriptions[i]) { + descriptions[j] = descriptions[i]; + j++; + } + } + descriptions.length = j; + } + + switch (descriptions.length) { + case 1: + return descriptions[0]; + + case 2: + return descriptions[0] + " or " + descriptions[1]; + + default: + return descriptions.slice(0, -1).join(", ") + + ", or " + + descriptions[descriptions.length - 1]; + } + } + + function describeFound(found) { + return found ? "\"" + literalEscape(found) + "\"" : "end of input"; + } + + return "Expected " + describeExpected(expected) + " but " + describeFound(found) + " found."; + }; + + function peg$parse(input, options) { + options = options !== void 0 ? options : {}; - peg$FAILED = {}, + var peg$FAILED = {}, peg$startRuleFunctions = { start: peg$parsestart }, peg$startRuleFunction = peg$parsestart, peg$c0 = function(t) { console.assert(t instanceof ast.LList); return t.toArray(); }, peg$c1 = /^[ \t\n\r]/, - peg$c2 = { type: "class", value: "[ \\t\\n\\r]", description: "[ \\t\\n\\r]" }, + peg$c2 = peg$classExpectation([" ", "\t", "\n", "\r"], false, false), peg$c3 = "\\,", - peg$c4 = { type: "literal", value: "\\,", description: "\"\\\\,\"" }, + peg$c4 = peg$literalExpectation("\\,", false), peg$c5 = "\\;", - peg$c6 = { type: "literal", value: "\\;", description: "\"\\\\;\"" }, + peg$c6 = peg$literalExpectation("\\;", false), peg$c7 = "\\ ", - peg$c8 = { type: "literal", value: "\\ ", description: "\"\\\\ \"" }, + peg$c8 = peg$literalExpectation("\\ ", false), peg$c9 = "!", - peg$c10 = { type: "literal", value: "!", description: "\"!\"" }, + peg$c10 = peg$literalExpectation("!", false), peg$c11 = "\\>", - peg$c12 = { type: "literal", value: "\\>", description: "\"\\\\>\"" }, + peg$c12 = peg$literalExpectation("\\>", false), peg$c13 = "\\:", - peg$c14 = { type: "literal", value: "\\:", description: "\"\\\\:\"" }, + peg$c14 = peg$literalExpectation("\\:", false), peg$c15 = "\\enspace", - peg$c16 = { type: "literal", value: "\\enspace", description: "\"\\\\enspace\"" }, + peg$c16 = peg$literalExpectation("\\enspace", false), peg$c17 = "\\quad", - peg$c18 = { type: "literal", value: "\\quad", description: "\"\\\\quad\"" }, + peg$c18 = peg$literalExpectation("\\quad", false), peg$c19 = "\\qquad", - peg$c20 = { type: "literal", value: "\\qquad", description: "\"\\\\qquad\"" }, + peg$c20 = peg$literalExpectation("\\qquad", false), peg$c21 = "\\thinspace", - peg$c22 = { type: "literal", value: "\\thinspace", description: "\"\\\\thinspace\"" }, + peg$c22 = peg$literalExpectation("\\thinspace", false), peg$c23 = "\\thinmuskip", - peg$c24 = { type: "literal", value: "\\thinmuskip", description: "\"\\\\thinmuskip\"" }, + peg$c24 = peg$literalExpectation("\\thinmuskip", false), peg$c25 = "\\medmuskip", - peg$c26 = { type: "literal", value: "\\medmuskip", description: "\"\\\\medmuskip\"" }, + peg$c26 = peg$literalExpectation("\\medmuskip", false), peg$c27 = "\\thickmuskip", - peg$c28 = { type: "literal", value: "\\thickmuskip", description: "\"\\\\thickmuskip\"" }, + peg$c28 = peg$literalExpectation("\\thickmuskip", false), peg$c29 = "\\kern", - peg$c30 = { type: "literal", value: "\\kern", description: "\"\\\\kern\"" }, + peg$c30 = peg$literalExpectation("\\kern", false), peg$c31 = "\\hskip", - peg$c32 = { type: "literal", value: "\\hskip", description: "\"\\\\hskip\"" }, + peg$c32 = peg$literalExpectation("\\hskip", false), peg$c33 = "\\hspace", - peg$c34 = { type: "literal", value: "\\hspace", description: "\"\\\\hspace\"" }, + peg$c34 = peg$literalExpectation("\\hspace", false), peg$c35 = "{", - peg$c36 = { type: "literal", value: "{", description: "\"{\"" }, + peg$c36 = peg$literalExpectation("{", false), peg$c37 = "}", - peg$c38 = { type: "literal", value: "}", description: "\"}\"" }, + peg$c38 = peg$literalExpectation("}", false), peg$c39 = "~", - peg$c40 = { type: "literal", value: "~", description: "\"~\"" }, + peg$c40 = peg$literalExpectation("~", false), peg$c41 = "\\hfill", - peg$c42 = { type: "literal", value: "\\hfill", description: "\"\\\\hfill\"" }, + peg$c42 = peg$literalExpectation("\\hfill", false), peg$c43 = "\\hfil", - peg$c44 = { type: "literal", value: "\\hfil", description: "\"\\\\hfil\"" }, + peg$c44 = peg$literalExpectation("\\hfil", false), peg$c45 = "\\hphantom", - peg$c46 = { type: "literal", value: "\\hphantom", description: "\"\\\\hphantom\"" }, + peg$c46 = peg$literalExpectation("\\hphantom", false), peg$c47 = function(e) { return e; }, peg$c48 = function(e1, name, e2) { return ast.LList(ast.Tex.INFIX(name, e1.toArray(), e2.toArray())); }, peg$c49 = function(e1, f, e2) { return ast.LList(ast.Tex.INFIXh(f[0], f[1], e1.toArray(), e2.toArray()));}, @@ -109,30 +213,30 @@ module.exports = (function() { peg$c66 = function(f, l) { return ast.Tex.PAREN2(f, l); }, peg$c67 = function(f, l) { return ast.Tex.PAREN1(f, l); }, peg$c68 = "P_", - peg$c69 = { type: "literal", value: "P_", description: "\"P_\"" }, + peg$c69 = peg$literalExpectation("P_", false), peg$c70 = "^", - peg$c71 = { type: "literal", value: "^", description: "\"^\"" }, + peg$c71 = peg$literalExpectation("^", false), peg$c72 = ",", - peg$c73 = { type: "literal", value: ",", description: "\",\"" }, + peg$c73 = peg$literalExpectation(",", false), peg$c74 = function(l, l2, l3, l4) { return options.semanticlatex; }, peg$c75 = function(l, l2, l3, l4) { return ast.Tex.JACOBI(l, l2, l3, l4); }, peg$c76 = "L_", - peg$c77 = { type: "literal", value: "L_", description: "\"L_\"" }, + peg$c77 = peg$literalExpectation("L_", false), peg$c78 = function(l, l2, l3) { return options.semanticlatex; }, peg$c79 = function(l, l2, l3) { return ast.Tex.LAGUERRE2(l, l2, l3); }, peg$c80 = function(l, l2) { return options.semanticlatex; }, peg$c81 = function(l, l2) { return ast.Tex.LAGUERRE1(l, l2); }, peg$c82 = ";", - peg$c83 = { type: "literal", value: ";", description: "\";\"" }, + peg$c83 = peg$literalExpectation(";", false), peg$c84 = "_", - peg$c85 = { type: "literal", value: "_", description: "\"_\"" }, + peg$c85 = peg$literalExpectation("_", false), peg$c86 = function(l, l2, l3) { return ast.Tex.QPOCH(l, l2, l3); }, peg$c87 = function(l1, l2) { return options.semanticlatex; }, peg$c88 = function(l1, l2) { return ast.Tex.POCH(l1, l2); }, peg$c89 = function(name, l) { return options.semanticlatex; }, peg$c90 = function(name, l) { return ast.Tex.PAREN2(name, l); }, peg$c91 = "\\rm", - peg$c92 = { type: "literal", value: "\\rm", description: "\"\\\\rm\"" }, + peg$c92 = peg$literalExpectation("\\rm", false), peg$c93 = function(e, l1, l2) { return options.semanticlatex; }, peg$c94 = function(e, l1, l2) { return ast.Tex.EJACOBI(e, l1, l2); }, peg$c95 = function(r) { return ast.Tex.LITERAL(r); }, @@ -156,13 +260,13 @@ module.exports = (function() { peg$c109 = function(f, l1, l2) { return options.semanticlatex; }, peg$c110 = function(f, l1, l2) { return ast.Tex.LAGUERRE1(l1 ,l2); }, peg$c111 = "[", - peg$c112 = { type: "literal", value: "[", description: "\"[\"" }, + peg$c112 = peg$literalExpectation("[", false), peg$c113 = "]", - peg$c114 = { type: "literal", value: "]", description: "\"]\"" }, + peg$c114 = peg$literalExpectation("]", false), peg$c115 = function(f, l1, l2, l3) { return options.semanticlatex; }, peg$c116 = function(f, l1, l2, l3) { return ast.Tex.LAGUERRE2(l1, l2, l3); }, peg$c117 = "\\Jacobi", - peg$c118 = { type: "literal", value: "\\Jacobi", description: "\"\\\\Jacobi\"" }, + peg$c118 = peg$literalExpectation("\\Jacobi", false), peg$c119 = function(e) { return ast.Tex.CURLY(e.toArray()); }, peg$c120 = function(e1, name, e2) { return ast.Tex.INFIX(name, e1.toArray(), e2.toArray()); }, peg$c121 = function(e1, f, e2) { return ast.Tex.INFIXh(f[0], f[1], e1.toArray(), e2.toArray()); }, @@ -180,7 +284,7 @@ module.exports = (function() { peg$c133 = function(m) { return ast.Tex.MULTLINE("multline", lst2arr(m)); }, peg$c134 = function(m) { return ast.Tex.MULTLINE("multline*", lst2arr(m)); }, peg$c135 = "\\begin{", - peg$c136 = { type: "literal", value: "\\begin{", description: "\"\\\\begin{\"" }, + peg$c136 = peg$literalExpectation("\\begin{", false), peg$c137 = function() { throw new peg$SyntaxError("Illegal TeX function", [], text(), location()); }, peg$c138 = function(f) { return !tu.all_functions[f]; }, peg$c139 = function(f) { throw new peg$SyntaxError("Illegal TeX function", [], f, location()); }, @@ -219,79 +323,79 @@ module.exports = (function() { peg$c159 = function() { return text(); }, peg$c160 = function(cs) { return ast.Tex.CURLY([ast.Tex.LITERAL(ast.RenderT.TEX_ONLY(cs))]); }, peg$c161 = /^[lrc]/, - peg$c162 = { type: "class", value: "[lrc]", description: "[lrc]" }, + peg$c162 = peg$classExpectation(["l", "r", "c"], false, false), peg$c163 = "p", - peg$c164 = { type: "literal", value: "p", description: "\"p\"" }, + peg$c164 = peg$literalExpectation("p", false), peg$c165 = "*", - peg$c166 = { type: "literal", value: "*", description: "\"*\"" }, + peg$c166 = peg$literalExpectation("*", false), peg$c167 = /^[0-9]/, - peg$c168 = { type: "class", value: "[0-9]", description: "[0-9]" }, + peg$c168 = peg$classExpectation([["0", "9"]], false, false), peg$c169 = "||", - peg$c170 = { type: "literal", value: "||", description: "\"||\"" }, + peg$c170 = peg$literalExpectation("||", false), peg$c171 = "|", - peg$c172 = { type: "literal", value: "|", description: "\"|\"" }, + peg$c172 = peg$literalExpectation("|", false), peg$c173 = "@", - peg$c174 = { type: "literal", value: "@", description: "\"@\"" }, + peg$c174 = peg$literalExpectation("@", false), peg$c175 = function(num) { return ast.Tex.CURLY([ast.Tex.LITERAL(ast.RenderT.TEX_ONLY(num))]); }, peg$c176 = /^[tcb]/, - peg$c177 = { type: "class", value: "[tcb]", description: "[tcb]" }, + peg$c177 = peg$classExpectation(["t", "c", "b"], false, false), peg$c178 = /^[a-zA-Z]/, - peg$c179 = { type: "class", value: "[a-zA-Z]", description: "[a-zA-Z]" }, + peg$c179 = peg$classExpectation([["a", "z"], ["A", "Z"]], false, false), peg$c180 = /^[,:;?!']/, - peg$c181 = { type: "class", value: "[,:;?!\\']", description: "[,:;?!\\']" }, + peg$c181 = peg$classExpectation([",", ":", ";", "?", "!", "'"], false, false), peg$c182 = /^[().]/, - peg$c183 = { type: "class", value: "[().]", description: "[().]" }, + peg$c183 = peg$classExpectation(["(", ")", "."], false, false), peg$c184 = /^[\-+*=]/, - peg$c185 = { type: "class", value: "[-+*=]", description: "[-+*=]" }, + peg$c185 = peg$classExpectation(["-", "+", "*", "="], false, false), peg$c186 = /^[\/|]/, - peg$c187 = { type: "class", value: "[\\/|]", description: "[\\/|]" }, + peg$c187 = peg$classExpectation(["/", "|"], false, false), peg$c188 = "-", - peg$c189 = { type: "literal", value: "-", description: "\"-\"" }, + peg$c189 = peg$literalExpectation("-", false), peg$c190 = ".", - peg$c191 = { type: "literal", value: ".", description: "\".\"" }, + peg$c191 = peg$literalExpectation(".", false), peg$c192 = "pt", - peg$c193 = { type: "literal", value: "pt", description: "\"pt\"" }, + peg$c193 = peg$literalExpectation("pt", false), peg$c194 = "pc", - peg$c195 = { type: "literal", value: "pc", description: "\"pc\"" }, + peg$c195 = peg$literalExpectation("pc", false), peg$c196 = "in", - peg$c197 = { type: "literal", value: "in", description: "\"in\"" }, + peg$c197 = peg$literalExpectation("in", false), peg$c198 = "cm", - peg$c199 = { type: "literal", value: "cm", description: "\"cm\"" }, + peg$c199 = peg$literalExpectation("cm", false), peg$c200 = "bp", - peg$c201 = { type: "literal", value: "bp", description: "\"bp\"" }, + peg$c201 = peg$literalExpectation("bp", false), peg$c202 = "mm", - peg$c203 = { type: "literal", value: "mm", description: "\"mm\"" }, + peg$c203 = peg$literalExpectation("mm", false), peg$c204 = "dd", - peg$c205 = { type: "literal", value: "dd", description: "\"dd\"" }, + peg$c205 = peg$literalExpectation("dd", false), peg$c206 = "cc", - peg$c207 = { type: "literal", value: "cc", description: "\"cc\"" }, + peg$c207 = peg$literalExpectation("cc", false), peg$c208 = "sp", - peg$c209 = { type: "literal", value: "sp", description: "\"sp\"" }, + peg$c209 = peg$literalExpectation("sp", false), peg$c210 = "ex", - peg$c211 = { type: "literal", value: "ex", description: "\"ex\"" }, + peg$c211 = peg$literalExpectation("ex", false), peg$c212 = "em", - peg$c213 = { type: "literal", value: "em", description: "\"em\"" }, + peg$c213 = peg$literalExpectation("em", false), peg$c214 = "mu", - peg$c215 = { type: "literal", value: "mu", description: "\"mu\"" }, + peg$c215 = peg$literalExpectation("mu", false), peg$c216 = "px", - peg$c217 = { type: "literal", value: "px", description: "\"px\"" }, + peg$c217 = peg$literalExpectation("px", false), peg$c218 = /^[@]/, - peg$c219 = { type: "class", value: "[@]", description: "[@]" }, + peg$c219 = peg$classExpectation(["@"], false, false), peg$c220 = /^[\-0-9a-zA-Z+*,=():\/;?.!'` \x80-\uD7FF\uE000-\uFFFF]/, - peg$c221 = { type: "class", value: "[-0-9a-zA-Z+*,=():\\/;?.!\\'` \\x80-\\ud7ff\\ue000-\\uffff]", description: "[-0-9a-zA-Z+*,=():\\/;?.!\\'` \\x80-\\ud7ff\\ue000-\\uffff]" }, + peg$c221 = peg$classExpectation(["-", ["0", "9"], ["a", "z"], ["A", "Z"], "+", "*", ",", "=", "(", ")", ":", "/", ";", "?", ".", "!", "'", "`", " ", ["\x80", "\uD7FF"], ["\uE000", "\uFFFF"]], false, false), peg$c222 = /^[\uD800-\uDBFF]/, - peg$c223 = { type: "class", value: "[\\ud800-\\udbff]", description: "[\\ud800-\\udbff]" }, + peg$c223 = peg$classExpectation([["\uD800", "\uDBFF"]], false, false), peg$c224 = /^[\uDC00-\uDFFF]/, - peg$c225 = { type: "class", value: "[\\udc00-\\udfff]", description: "[\\udc00-\\udfff]" }, + peg$c225 = peg$classExpectation([["\uDC00", "\uDFFF"]], false, false), peg$c226 = function(l, h) { return text(); }, peg$c227 = function(b) { return tu.box_functions[b]; }, peg$c228 = function(b, cs) { return ast.Tex.BOX(b, cs.join('')); }, peg$c229 = function(c) { return ast.RenderT.TEX_ONLY(c); }, peg$c230 = function(f) { return tu.latex_function_names[f]; }, peg$c231 = "(", - peg$c232 = { type: "literal", value: "(", description: "\"(\"" }, + peg$c232 = peg$literalExpectation("(", false), peg$c233 = "\\{", - peg$c234 = { type: "literal", value: "\\{", description: "\"\\\\{\"" }, + peg$c234 = peg$literalExpectation("\\{", false), peg$c235 = function(f) { return " ";}, peg$c236 = function(f, c) { return ast.RenderT.TEX_ONLY(f + c); }, peg$c237 = function(f) { return tu.mediawiki_function_names[f]; }, @@ -311,18 +415,18 @@ module.exports = (function() { peg$c251 = function(mbox, f) { return ast.RenderT.TEX_ONLY("\\mbox{" + f + "} "); }, peg$c252 = function(f) { return ast.RenderT.TEX_ONLY(f); }, peg$c253 = "\\", - peg$c254 = { type: "literal", value: "\\", description: "\"\\\\\"" }, + peg$c254 = peg$literalExpectation("\\", false), peg$c255 = /^[, ;!_#%$&]/, - peg$c256 = { type: "class", value: "[, ;!_#%$&]", description: "[, ;!_#%$&]" }, + peg$c256 = peg$classExpectation([",", " ", ";", "!", "_", "#", "%", "$", "&"], false, false), peg$c257 = function(c) { return ast.RenderT.TEX_ONLY("\\" + c); }, peg$c258 = /^[><~]/, - peg$c259 = { type: "class", value: "[><~]", description: "[><~]" }, + peg$c259 = peg$classExpectation([">", "<", "~"], false, false), peg$c260 = /^[%$]/, - peg$c261 = { type: "class", value: "[%$]", description: "[%$]" }, + peg$c261 = peg$classExpectation(["%", "$"], false, false), peg$c262 = function(c) { return ast.RenderT.TEX_ONLY("\\" + c); /* escape dangerous chars */}, peg$c263 = function(f) { return ast.RenderT.TEX_ONLY(tu.other_literals3[f] + " "); }, peg$c264 = /^[{}|]/, - peg$c265 = { type: "class", value: "[{}|]", description: "[{}|]" }, + peg$c265 = peg$classExpectation(["{", "}", "|"], false, false), peg$c266 = function(f) { return tu.other_delimiters1[f]; }, peg$c267 = function(f) { return tu.other_delimiters2[f]; }, peg$c268 = function(f) { var p = peg$parse(tu.other_delimiters2[f]); @@ -336,81 +440,81 @@ module.exports = (function() { peg$c271 = function(f) { return f; }, peg$c272 = function(f) { return tu.fun_ar1opt[f]; }, peg$c273 = "&", - peg$c274 = { type: "literal", value: "&", description: "\"&\"" }, + peg$c274 = peg$literalExpectation("&", false), peg$c275 = "\\\\", - peg$c276 = { type: "literal", value: "\\\\", description: "\"\\\\\\\\\"" }, + peg$c276 = peg$literalExpectation("\\\\", false), peg$c277 = "\\begin", - peg$c278 = { type: "literal", value: "\\begin", description: "\"\\\\begin\"" }, + peg$c278 = peg$literalExpectation("\\begin", false), peg$c279 = "\\end", - peg$c280 = { type: "literal", value: "\\end", description: "\"\\\\end\"" }, + peg$c280 = peg$literalExpectation("\\end", false), peg$c281 = "{matrix}", - peg$c282 = { type: "literal", value: "{matrix}", description: "\"{matrix}\"" }, + peg$c282 = peg$literalExpectation("{matrix}", false), peg$c283 = "{pmatrix}", - peg$c284 = { type: "literal", value: "{pmatrix}", description: "\"{pmatrix}\"" }, + peg$c284 = peg$literalExpectation("{pmatrix}", false), peg$c285 = "{bmatrix}", - peg$c286 = { type: "literal", value: "{bmatrix}", description: "\"{bmatrix}\"" }, + peg$c286 = peg$literalExpectation("{bmatrix}", false), peg$c287 = "{Bmatrix}", - peg$c288 = { type: "literal", value: "{Bmatrix}", description: "\"{Bmatrix}\"" }, + peg$c288 = peg$literalExpectation("{Bmatrix}", false), peg$c289 = "{vmatrix}", - peg$c290 = { type: "literal", value: "{vmatrix}", description: "\"{vmatrix}\"" }, + peg$c290 = peg$literalExpectation("{vmatrix}", false), peg$c291 = "{Vmatrix}", - peg$c292 = { type: "literal", value: "{Vmatrix}", description: "\"{Vmatrix}\"" }, + peg$c292 = peg$literalExpectation("{Vmatrix}", false), peg$c293 = "{array}", - peg$c294 = { type: "literal", value: "{array}", description: "\"{array}\"" }, + peg$c294 = peg$literalExpectation("{array}", false), peg$c295 = "{align}", - peg$c296 = { type: "literal", value: "{align}", description: "\"{align}\"" }, + peg$c296 = peg$literalExpectation("{align}", false), peg$c297 = "{aligned}", - peg$c298 = { type: "literal", value: "{aligned}", description: "\"{aligned}\"" }, + peg$c298 = peg$literalExpectation("{aligned}", false), peg$c299 = "{alignat}", - peg$c300 = { type: "literal", value: "{alignat}", description: "\"{alignat}\"" }, + peg$c300 = peg$literalExpectation("{alignat}", false), peg$c301 = "{alignedat}", - peg$c302 = { type: "literal", value: "{alignedat}", description: "\"{alignedat}\"" }, + peg$c302 = peg$literalExpectation("{alignedat}", false), peg$c303 = "{smallmatrix}", - peg$c304 = { type: "literal", value: "{smallmatrix}", description: "\"{smallmatrix}\"" }, + peg$c304 = peg$literalExpectation("{smallmatrix}", false), peg$c305 = "{cases}", - peg$c306 = { type: "literal", value: "{cases}", description: "\"{cases}\"" }, + peg$c306 = peg$literalExpectation("{cases}", false), peg$c307 = "{multline}", - peg$c308 = { type: "literal", value: "{multline}", description: "\"{multline}\"" }, + peg$c308 = peg$literalExpectation("{multline}", false), peg$c309 = "{multline*}", - peg$c310 = { type: "literal", value: "{multline*}", description: "\"{multline*}\"" }, + peg$c310 = peg$literalExpectation("{multline*}", false), peg$c311 = "\\big(", - peg$c312 = { type: "literal", value: "\\big(", description: "\"\\\\big(\"" }, + peg$c312 = peg$literalExpectation("\\big(", false), peg$c313 = "\\Big(", - peg$c314 = { type: "literal", value: "\\Big(", description: "\"\\\\Big(\"" }, + peg$c314 = peg$literalExpectation("\\Big(", false), peg$c315 = "\\bigg(", - peg$c316 = { type: "literal", value: "\\bigg(", description: "\"\\\\bigg(\"" }, + peg$c316 = peg$literalExpectation("\\bigg(", false), peg$c317 = "\\Bigg(", - peg$c318 = { type: "literal", value: "\\Bigg(", description: "\"\\\\Bigg(\"" }, + peg$c318 = peg$literalExpectation("\\Bigg(", false), peg$c319 = "\\bigl(", - peg$c320 = { type: "literal", value: "\\bigl(", description: "\"\\\\bigl(\"" }, + peg$c320 = peg$literalExpectation("\\bigl(", false), peg$c321 = "\\Bigl(", - peg$c322 = { type: "literal", value: "\\Bigl(", description: "\"\\\\Bigl(\"" }, + peg$c322 = peg$literalExpectation("\\Bigl(", false), peg$c323 = "\\bigg1(", - peg$c324 = { type: "literal", value: "\\bigg1(", description: "\"\\\\bigg1(\"" }, + peg$c324 = peg$literalExpectation("\\bigg1(", false), peg$c325 = "\\Biggl(", - peg$c326 = { type: "literal", value: "\\Biggl(", description: "\"\\\\Biggl(\"" }, + peg$c326 = peg$literalExpectation("\\Biggl(", false), peg$c327 = "\\left(", - peg$c328 = { type: "literal", value: "\\left(", description: "\"\\\\left(\"" }, + peg$c328 = peg$literalExpectation("\\left(", false), peg$c329 = ")", - peg$c330 = { type: "literal", value: ")", description: "\")\"" }, + peg$c330 = peg$literalExpectation(")", false), peg$c331 = "\\big)", - peg$c332 = { type: "literal", value: "\\big)", description: "\"\\\\big)\"" }, + peg$c332 = peg$literalExpectation("\\big)", false), peg$c333 = "\\Big)", - peg$c334 = { type: "literal", value: "\\Big)", description: "\"\\\\Big)\"" }, + peg$c334 = peg$literalExpectation("\\Big)", false), peg$c335 = "\\bigg)", - peg$c336 = { type: "literal", value: "\\bigg)", description: "\"\\\\bigg)\"" }, + peg$c336 = peg$literalExpectation("\\bigg)", false), peg$c337 = "\\Bigg)", - peg$c338 = { type: "literal", value: "\\Bigg)", description: "\"\\\\Bigg)\"" }, + peg$c338 = peg$literalExpectation("\\Bigg)", false), peg$c339 = "\\bigr)", - peg$c340 = { type: "literal", value: "\\bigr)", description: "\"\\\\bigr)\"" }, + peg$c340 = peg$literalExpectation("\\bigr)", false), peg$c341 = "\\Bigr)", - peg$c342 = { type: "literal", value: "\\Bigr)", description: "\"\\\\Bigr)\"" }, + peg$c342 = peg$literalExpectation("\\Bigr)", false), peg$c343 = "\\biggr)", - peg$c344 = { type: "literal", value: "\\biggr)", description: "\"\\\\biggr)\"" }, + peg$c344 = peg$literalExpectation("\\biggr)", false), peg$c345 = "\\Biggr)", - peg$c346 = { type: "literal", value: "\\Biggr)", description: "\"\\\\Biggr)\"" }, + peg$c346 = peg$literalExpectation("\\Biggr)", false), peg$c347 = "\\right)", - peg$c348 = { type: "literal", value: "\\right)", description: "\"\\\\right)\"" }, + peg$c348 = peg$literalExpectation("\\right)", false), peg$c349 = function(f) { return tu.big_literals[f]; }, peg$c350 = function(f) { return tu.paren[f]; }, peg$c351 = function(f) { return tu.fun_ar1[f]; }, @@ -421,11 +525,11 @@ module.exports = (function() { peg$c356 = function(f) { return tu.jacobi[f]; }, peg$c357 = function(f) { return tu.laguerre[f]; }, peg$c358 = "sn", - peg$c359 = { type: "literal", value: "sn", description: "\"sn\"" }, + peg$c359 = peg$literalExpectation("sn", false), peg$c360 = "cn", - peg$c361 = { type: "literal", value: "cn", description: "\"cn\"" }, + peg$c361 = peg$literalExpectation("cn", false), peg$c362 = "dn", - peg$c363 = { type: "literal", value: "dn", description: "\"dn\"" }, + peg$c363 = peg$literalExpectation("dn", false), peg$c364 = function(f) { return tu.declh_function[f]; }, peg$c365 = function(f) { return ast.Tex.DECLh(f, ast.FontForce.RM(), []); /*see bug 54818*/ }, peg$c366 = function(f) { return tu.fun_ar2nb[f]; }, @@ -436,18 +540,18 @@ module.exports = (function() { peg$c371 = function(f, cs) { return f + cs; }, peg$c372 = function(f) { return tu.definecolor_function[f]; }, peg$c373 = "named", - peg$c374 = { type: "literal", value: "named", description: "\"named\"" }, + peg$c374 = peg$literalExpectation("named", true), peg$c375 = function(f, name, cs) { return "{named}" + cs; }, peg$c376 = "gray", - peg$c377 = { type: "literal", value: "gray", description: "\"gray\"" }, + peg$c377 = peg$literalExpectation("gray", true), peg$c378 = function(f, name, cs) { return "{gray}" + cs; }, peg$c379 = "rgb", - peg$c380 = { type: "literal", value: "rgb", description: "\"rgb\"" }, + peg$c380 = peg$literalExpectation("rgb", false), peg$c381 = function(f, name, cs) { return "{rgb}" + cs; }, peg$c382 = "RGB", - peg$c383 = { type: "literal", value: "RGB", description: "\"RGB\"" }, + peg$c383 = peg$literalExpectation("RGB", false), peg$c384 = "cmyk", - peg$c385 = { type: "literal", value: "cmyk", description: "\"cmyk\"" }, + peg$c385 = peg$literalExpectation("cmyk", true), peg$c386 = function(f, name, cs) { return "{cmyk}" + cs; }, peg$c387 = function(f, name, a) { return f + "{" + name.join('') + "}" + a; }, peg$c388 = function(cs) { return "[named]" + cs; }, @@ -459,20 +563,20 @@ module.exports = (function() { peg$c394 = function(r, g, b) { return "{"+r+","+g+","+b+"}"; }, peg$c395 = function(c, m, y, k) { return "{"+c+","+m+","+y+","+k+"}"; }, peg$c396 = "0", - peg$c397 = { type: "literal", value: "0", description: "\"0\"" }, + peg$c397 = peg$literalExpectation("0", false), peg$c398 = /^[1-9]/, - peg$c399 = { type: "class", value: "[1-9]", description: "[1-9]" }, + peg$c399 = peg$classExpectation([["1", "9"]], false, false), peg$c400 = function(n) { return parseInt(n, 10) <= 255; }, peg$c401 = function(n) { return n / 255; }, peg$c402 = function(n) { return n; }, peg$c403 = /^[01]/, - peg$c404 = { type: "class", value: "[01]", description: "[01]" }, + peg$c404 = peg$classExpectation(["0", "1"], false, false), peg$c405 = function() { return false; }, peg$c406 = function() { return peg$currPos === input.length; }, peg$currPos = 0, peg$savedPos = 0, - peg$posDetailsCache = [{ line: 1, column: 1, seenCR: false }], + peg$posDetailsCache = [{ line: 1, column: 1 }], peg$maxFailPos = 0, peg$maxFailExpected = [], peg$silentFails = 0, @@ -497,27 +601,44 @@ module.exports = (function() { return peg$computeLocation(peg$savedPos, peg$currPos); } - function expected(description) { - throw peg$buildException( - null, - [{ type: "other", description: description }], + function expected(description, location) { + location = location !== void 0 ? location : peg$computeLocation(peg$savedPos, peg$currPos) + + throw peg$buildStructuredError( + [peg$otherExpectation(description)], input.substring(peg$savedPos, peg$currPos), - peg$computeLocation(peg$savedPos, peg$currPos) + location ); } - function error(message) { - throw peg$buildException( - message, - null, - input.substring(peg$savedPos, peg$currPos), - peg$computeLocation(peg$savedPos, peg$currPos) - ); + function error(message, location) { + location = location !== void 0 ? location : peg$computeLocation(peg$savedPos, peg$currPos) + + throw peg$buildSimpleError(message, location); + } + + function peg$literalExpectation(text, ignoreCase) { + return { type: "literal", text: text, ignoreCase: ignoreCase }; + } + + function peg$classExpectation(parts, inverted, ignoreCase) { + return { type: "class", parts: parts, inverted: inverted, ignoreCase: ignoreCase }; + } + + function peg$anyExpectation() { + return { type: "any" }; + } + + function peg$endExpectation() { + return { type: "end" }; + } + + function peg$otherExpectation(description) { + return { type: "other", description: description }; } function peg$computePosDetails(pos) { - var details = peg$posDetailsCache[pos], - p, ch; + var details = peg$posDetailsCache[pos], p; if (details) { return details; @@ -530,23 +651,15 @@ module.exports = (function() { details = peg$posDetailsCache[p]; details = { line: details.line, - column: details.column, - seenCR: details.seenCR + column: details.column }; while (p < pos) { - 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") { + if (input.charCodeAt(p) === 10) { details.line++; details.column = 1; - details.seenCR = true; } else { details.column++; - details.seenCR = false; } p++; @@ -586,71 +699,13 @@ module.exports = (function() { peg$maxFailExpected.push(expected); } - function peg$buildException(message, expected, found, location) { - function cleanupExpected(expected) { - var i = 1; - - expected.sort(function(a, b) { - if (a.description < b.description) { - return -1; - } else if (a.description > b.description) { - return 1; - } else { - return 0; - } - }); - - while (i < expected.length) { - if (expected[i - 1] === expected[i]) { - expected.splice(i, 1); - } else { - i++; - } - } - } - - 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(/[\u0100-\u0FFF]/g, function(ch) { return '\\u0' + hex(ch); }) - .replace(/[\u1000-\uFFFF]/g, function(ch) { return '\\u' + hex(ch); }); - } - - var expectedDescs = new Array(expected.length), - expectedDesc, foundDesc, i; - - for (i = 0; i < expected.length; i++) { - expectedDescs[i] = expected[i].description; - } - - expectedDesc = expected.length > 1 ? - expectedDescs.slice(0, -1).join(", ") + - " or " + - expectedDescs[expected.length - 1] : - expectedDescs[0]; - - foundDesc = found ? "\"" + stringEscape(found) + "\"" : "end of input"; - - return "Expected " + expectedDesc + " but " + foundDesc + " found."; - } - - if (expected !== null) { - cleanupExpected(expected); - } + function peg$buildSimpleError(message, location) { + return new peg$SyntaxError(message, null, null, location); + } + function peg$buildStructuredError(expected, found, location) { return new peg$SyntaxError( - message !== null ? message : buildMessage(expected, found), + peg$SyntaxError.buildMessage(expected, found), expected, found, location @@ -12864,11 +12919,10 @@ module.exports = (function() { return peg$result; } else { if (peg$result !== peg$FAILED && peg$currPos < input.length) { - peg$fail({ type: "end", description: "end of input" }); + peg$fail(peg$endExpectation()); } - throw peg$buildException( - null, + throw peg$buildStructuredError( peg$maxFailExpected, peg$maxFailPos < input.length ? input.charAt(peg$maxFailPos) : null, peg$maxFailPos < input.length ? From 9c7b69c0c67f4f6bee6c297ab90cccf8b5e5c232 Mon Sep 17 00:00:00 2001 From: Jagan Prem Date: Mon, 22 Aug 2016 11:25:13 -0400 Subject: [PATCH 06/10] Add parser.js to .jshintignore --- .jshintignore | 1 + lib/build-parser.js | 12 ++++++------ lib/parser.js | 9 +++------ 3 files changed, 10 insertions(+), 12 deletions(-) diff --git a/.jshintignore b/.jshintignore index 3c3629e..d79d9eb 100644 --- a/.jshintignore +++ b/.jshintignore @@ -1 +1,2 @@ node_modules +lib/parser.js \ No newline at end of file diff --git a/lib/build-parser.js b/lib/build-parser.js index 57804ee..20bb873 100644 --- a/lib/build-parser.js +++ b/lib/build-parser.js @@ -15,13 +15,13 @@ var buildParser = module.exports = function(inFile, outFile) { allowedStartTules: [ "start" ] }); // hack up the source to make it pass jshint - parserSource = parserSource - .replace(/(peg\$subclass\(child, parent\)|peg\$SyntaxError\(message, expected, found, location\)|peg\$parse\(input\)) {/g, - function (m) { - return m + "\n /*jshint validthis:true, newcap:false*/ "; - }).replace(/\n(\s+)([?:+]) (expectedDescs|" or "|peg)/g, ' $2\n$1$3'); +// parserSource = parserSource +// .replace(/(peg\$subclass\(child, parent\)|peg\$SyntaxError\(message, expected, found, location\)|peg\$parse\(input\)) {/g, +// function (m) { +// return m + "\n /*jshint validthis:true, newcap:false*/ "; +// }).replace(/\n(\s+)([?:+]) (expectedDescs|" or "|peg)/g, ' $2\n$1$3'); parserSource = - '/* jshint latedef: false */\n' + +// '/* jshint latedef: false */\n' + 'module.exports = ' + parserSource + ';'; fs.writeFileSync(outFile, parserSource, 'utf8'); diff --git a/lib/parser.js b/lib/parser.js index d37d980..c544a39 100644 --- a/lib/parser.js +++ b/lib/parser.js @@ -1,4 +1,3 @@ -/* jshint latedef: false */ module.exports = /* * Generated by PEG.js 0.10.0. * @@ -8,14 +7,12 @@ module.exports = /* "use strict"; function peg$subclass(child, parent) { - /*jshint validthis:true, newcap:false*/ function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); } function peg$SyntaxError(message, expected, found, location) { - /*jshint validthis:true, newcap:false*/ this.message = message; this.expected = expected; this.found = found; @@ -12925,9 +12922,9 @@ module.exports = /* throw peg$buildStructuredError( peg$maxFailExpected, peg$maxFailPos < input.length ? input.charAt(peg$maxFailPos) : null, - peg$maxFailPos < input.length ? - peg$computeLocation(peg$maxFailPos, peg$maxFailPos + 1) : - peg$computeLocation(peg$maxFailPos, peg$maxFailPos) + peg$maxFailPos < input.length + ? peg$computeLocation(peg$maxFailPos, peg$maxFailPos + 1) + : peg$computeLocation(peg$maxFailPos, peg$maxFailPos) ); } } From 4da141b18889b9b8b2007dc733e143fe1eb069ab Mon Sep 17 00:00:00 2001 From: Jagan Prem Date: Tue, 23 Aug 2016 08:13:30 -0400 Subject: [PATCH 07/10] Reuse astutil code for MATRIX with MULTLINE. --- lib/astutil.js | 36 ++++++++++++++---------------------- lib/build-parser.js | 2 +- 2 files changed, 15 insertions(+), 23 deletions(-) diff --git a/lib/astutil.js b/lib/astutil.js index 07e74b1..07bf8a8 100644 --- a/lib/astutil.js +++ b/lib/astutil.js @@ -65,6 +65,18 @@ ast.RenderT.prototype.tex_contains_func = function(target) { return t.charAt(0) === '\\' && match(target, t); }; +var matrixFunction = function(target, t, m) { + // \begin{env} .. & .. \\ .. & .. \\ .. & .. \end{env} + // t is the environment name. + // m is a doubly-nested array + var expr_has = function(e) { return arr_contains_func(e, target); }; + var line_has = function(l) { return some(l, expr_has); }; + var matrix_has = function(m) { return some(m, line_has); }; + return match(target, '\\begin{'+t+'}') || + match(target, '\\end{'+t+'}') || + matrix_has(m); +}; + // This defines a function of one argument, which becomes the first argument // in the visitor functions. The subsequent arguments in the definition // are the fields of that particular AST class. @@ -185,28 +197,8 @@ ast.Tex.defineVisitor("contains_func", { // \big\d where big is \big, \Big, \bigg, \Bigg, \biggl, etc return match(target, big) || d.tex_contains_func(target); }, - MATRIX: function(target, t, m) { - // \begin{env} .. & .. \\ .. & .. \\ .. & .. \end{env} - // t is the environment name. - // m is a doubly-nested array - var expr_has = function(e) { return arr_contains_func(e, target); }; - var line_has = function(l) { return some(l, expr_has); }; - var matrix_has = function(m) { return some(m, line_has); }; - return match(target, '\\begin{'+t+'}') || - match(target, '\\end{'+t+'}') || - matrix_has(m); - }, - MULTLINE: function(target, t, m) { - // \begin{env} .. \\ .. \\ .. \\ .. \end{env} - // t is the environment name. - // m is a one-dimensional array. - var expr_has = function(e) { return arr_contains_func(e, target); }; - var line_has = function(l) { return some(l, expr_has); }; - var lines_have = function(m) { return some(m, line_has); }; - return match(target, '\\begin{'+t+'}') || - match(target, '\\end{'+t+'}') || - lines_have(m); - }, + MATRIX: matrixFunction, + MULTLINE: matrixFunction, LR: function(target, l, r, tl) { // \left\l tl1 tl2 tl3 ... \right\r (a balanced pair of delimiters) return match(target, '\\left') || match(target, '\\right') || diff --git a/lib/build-parser.js b/lib/build-parser.js index 20bb873..2c486c6 100644 --- a/lib/build-parser.js +++ b/lib/build-parser.js @@ -12,7 +12,7 @@ var buildParser = module.exports = function(inFile, outFile) { /* PEGJS options */ output: "source", cache: true,// makes repeated calls to generic_func production efficient - allowedStartTules: [ "start" ] + allowedStartRules: [ "start" ] }); // hack up the source to make it pass jshint // parserSource = parserSource From f2b9efcd1a6bea569e898d570d3ad978832f3119 Mon Sep 17 00:00:00 2001 From: Jagan Prem Date: Tue, 23 Aug 2016 08:16:06 -0400 Subject: [PATCH 08/10] Remove commented code in build-parser.js --- .jshintignore | 2 +- lib/build-parser.js | 7 ------- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/.jshintignore b/.jshintignore index d79d9eb..99c04c6 100644 --- a/.jshintignore +++ b/.jshintignore @@ -1,2 +1,2 @@ node_modules -lib/parser.js \ No newline at end of file +lib/parser.js diff --git a/lib/build-parser.js b/lib/build-parser.js index 2c486c6..47a8f8b 100644 --- a/lib/build-parser.js +++ b/lib/build-parser.js @@ -14,14 +14,7 @@ var buildParser = module.exports = function(inFile, outFile) { cache: true,// makes repeated calls to generic_func production efficient allowedStartRules: [ "start" ] }); - // hack up the source to make it pass jshint -// parserSource = parserSource -// .replace(/(peg\$subclass\(child, parent\)|peg\$SyntaxError\(message, expected, found, location\)|peg\$parse\(input\)) {/g, -// function (m) { -// return m + "\n /*jshint validthis:true, newcap:false*/ "; -// }).replace(/\n(\s+)([?:+]) (expectedDescs|" or "|peg)/g, ' $2\n$1$3'); parserSource = -// '/* jshint latedef: false */\n' + 'module.exports = ' + parserSource + ';'; fs.writeFileSync(outFile, parserSource, 'utf8'); From 8cbdb01dc11ac429775a66048b579cedb48ce51f Mon Sep 17 00:00:00 2001 From: Jagan Prem Date: Tue, 23 Aug 2016 08:55:25 -0400 Subject: [PATCH 09/10] Add another newline to the end of .jshintignore --- .jshintignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.jshintignore b/.jshintignore index 99c04c6..b6cb45f 100644 --- a/.jshintignore +++ b/.jshintignore @@ -1,2 +1,3 @@ node_modules lib/parser.js + From cefc5327e853a30ef6b363aade3381fdfdb461df Mon Sep 17 00:00:00 2001 From: Jagan Prem Date: Wed, 24 Aug 2016 10:49:58 -0400 Subject: [PATCH 10/10] Removed multline* support --- lib/parser.js | 2031 +++++++++++++++++++++------------------------- lib/parser.pegjs | 8 - 2 files changed, 945 insertions(+), 1094 deletions(-) diff --git a/lib/parser.js b/lib/parser.js index c544a39..f623bd1 100644 --- a/lib/parser.js +++ b/lib/parser.js @@ -279,21 +279,20 @@ module.exports = /* peg$c131 = function(m) { return ast.Tex.MATRIX("smallmatrix", lst2arr(m)); }, peg$c132 = function(m) { return ast.Tex.MATRIX("cases", lst2arr(m)); }, peg$c133 = function(m) { return ast.Tex.MULTLINE("multline", lst2arr(m)); }, - peg$c134 = function(m) { return ast.Tex.MULTLINE("multline*", lst2arr(m)); }, - peg$c135 = "\\begin{", - peg$c136 = peg$literalExpectation("\\begin{", false), - peg$c137 = function() { throw new peg$SyntaxError("Illegal TeX function", [], text(), location()); }, - peg$c138 = function(f) { return !tu.all_functions[f]; }, - peg$c139 = function(f) { throw new peg$SyntaxError("Illegal TeX function", [], f, location()); }, - peg$c140 = function(f, l) { return ast.Tex.FUN1hl(f[0], f[1], l); }, - peg$c141 = function(f, l) { return ast.Tex.FUN1hf(f[0], f[1], l); }, - peg$c142 = function(f, l1, l2) { return ast.Tex.FUN2h(f[0], f[1], l1, l2); }, - peg$c143 = function(name, l1, l2, l3) { return options.semanticlatex; }, - peg$c144 = function(f) { throw new peg$SyntaxError("Illegal TeX function", [], text(), location()); }, - peg$c145 = function(l) { return ast.Tex.LITERAL(l); }, - peg$c146 = function(l) { return l; }, - peg$c147 = function(l) { return l;}, - peg$c148 = function(r) { + peg$c134 = "\\begin{", + peg$c135 = peg$literalExpectation("\\begin{", false), + peg$c136 = function() { throw new peg$SyntaxError("Illegal TeX function", [], text(), location()); }, + peg$c137 = function(f) { return !tu.all_functions[f]; }, + peg$c138 = function(f) { throw new peg$SyntaxError("Illegal TeX function", [], f, location()); }, + peg$c139 = function(f, l) { return ast.Tex.FUN1hl(f[0], f[1], l); }, + peg$c140 = function(f, l) { return ast.Tex.FUN1hf(f[0], f[1], l); }, + peg$c141 = function(f, l1, l2) { return ast.Tex.FUN2h(f[0], f[1], l1, l2); }, + peg$c142 = function(name, l1, l2, l3) { return options.semanticlatex; }, + peg$c143 = function(f) { throw new peg$SyntaxError("Illegal TeX function", [], text(), location()); }, + peg$c144 = function(l) { return ast.Tex.LITERAL(l); }, + peg$c145 = function(l) { return l; }, + peg$c146 = function(l) { return l;}, + peg$c147 = function(r) { var c = 0; var str = ""; str = r.join(""); @@ -307,269 +306,267 @@ module.exports = /* c = c + 1; } return ast.Tex.LITERAL(ast.RenderT.TEX_ONLY(str)); }, - peg$c149 = function() { return ast.Tex.LITERAL(ast.RenderT.TEX_ONLY("")); }, - peg$c150 = function(cs, m) { m.head[0].unshift(cs); return m; }, - peg$c151 = function(as, m) { m.head[0].unshift(as); return m; }, - peg$c152 = function(l, m) { return m; }, - peg$c153 = function(l, tail) { return { head: lst2arr(l), tail: tail }; }, - peg$c154 = function(f, l) { l.head.unshift(ast.Tex.LITERAL(ast.RenderT.TEX_ONLY(f + " "))); return l;}, - peg$c155 = function(e, l) { return l; }, - peg$c156 = function(e, tail) { return { head: e.toArray(), tail: tail }; }, - peg$c157 = function(f, m) { m.head.unshift(ast.Tex.LITERAL(ast.RenderT.TEX_ONLY(f + " "))); return m; }, - peg$c158 = function(e) { return { head: e.toArray(), tail: null }; }, - peg$c159 = function() { return text(); }, - peg$c160 = function(cs) { return ast.Tex.CURLY([ast.Tex.LITERAL(ast.RenderT.TEX_ONLY(cs))]); }, - peg$c161 = /^[lrc]/, - peg$c162 = peg$classExpectation(["l", "r", "c"], false, false), - peg$c163 = "p", - peg$c164 = peg$literalExpectation("p", false), - peg$c165 = "*", - peg$c166 = peg$literalExpectation("*", false), - peg$c167 = /^[0-9]/, - peg$c168 = peg$classExpectation([["0", "9"]], false, false), - peg$c169 = "||", - peg$c170 = peg$literalExpectation("||", false), - peg$c171 = "|", - peg$c172 = peg$literalExpectation("|", false), - peg$c173 = "@", - peg$c174 = peg$literalExpectation("@", false), - peg$c175 = function(num) { return ast.Tex.CURLY([ast.Tex.LITERAL(ast.RenderT.TEX_ONLY(num))]); }, - peg$c176 = /^[tcb]/, - peg$c177 = peg$classExpectation(["t", "c", "b"], false, false), - peg$c178 = /^[a-zA-Z]/, - peg$c179 = peg$classExpectation([["a", "z"], ["A", "Z"]], false, false), - peg$c180 = /^[,:;?!']/, - peg$c181 = peg$classExpectation([",", ":", ";", "?", "!", "'"], false, false), - peg$c182 = /^[().]/, - peg$c183 = peg$classExpectation(["(", ")", "."], false, false), - peg$c184 = /^[\-+*=]/, - peg$c185 = peg$classExpectation(["-", "+", "*", "="], false, false), - peg$c186 = /^[\/|]/, - peg$c187 = peg$classExpectation(["/", "|"], false, false), - peg$c188 = "-", - peg$c189 = peg$literalExpectation("-", false), - peg$c190 = ".", - peg$c191 = peg$literalExpectation(".", false), - peg$c192 = "pt", - peg$c193 = peg$literalExpectation("pt", false), - peg$c194 = "pc", - peg$c195 = peg$literalExpectation("pc", false), - peg$c196 = "in", - peg$c197 = peg$literalExpectation("in", false), - peg$c198 = "cm", - peg$c199 = peg$literalExpectation("cm", false), - peg$c200 = "bp", - peg$c201 = peg$literalExpectation("bp", false), - peg$c202 = "mm", - peg$c203 = peg$literalExpectation("mm", false), - peg$c204 = "dd", - peg$c205 = peg$literalExpectation("dd", false), - peg$c206 = "cc", - peg$c207 = peg$literalExpectation("cc", false), - peg$c208 = "sp", - peg$c209 = peg$literalExpectation("sp", false), - peg$c210 = "ex", - peg$c211 = peg$literalExpectation("ex", false), - peg$c212 = "em", - peg$c213 = peg$literalExpectation("em", false), - peg$c214 = "mu", - peg$c215 = peg$literalExpectation("mu", false), - peg$c216 = "px", - peg$c217 = peg$literalExpectation("px", false), - peg$c218 = /^[@]/, - peg$c219 = peg$classExpectation(["@"], false, false), - peg$c220 = /^[\-0-9a-zA-Z+*,=():\/;?.!'` \x80-\uD7FF\uE000-\uFFFF]/, - peg$c221 = peg$classExpectation(["-", ["0", "9"], ["a", "z"], ["A", "Z"], "+", "*", ",", "=", "(", ")", ":", "/", ";", "?", ".", "!", "'", "`", " ", ["\x80", "\uD7FF"], ["\uE000", "\uFFFF"]], false, false), - peg$c222 = /^[\uD800-\uDBFF]/, - peg$c223 = peg$classExpectation([["\uD800", "\uDBFF"]], false, false), - peg$c224 = /^[\uDC00-\uDFFF]/, - peg$c225 = peg$classExpectation([["\uDC00", "\uDFFF"]], false, false), - peg$c226 = function(l, h) { return text(); }, - peg$c227 = function(b) { return tu.box_functions[b]; }, - peg$c228 = function(b, cs) { return ast.Tex.BOX(b, cs.join('')); }, - peg$c229 = function(c) { return ast.RenderT.TEX_ONLY(c); }, - peg$c230 = function(f) { return tu.latex_function_names[f]; }, - peg$c231 = "(", - peg$c232 = peg$literalExpectation("(", false), - peg$c233 = "\\{", - peg$c234 = peg$literalExpectation("\\{", false), - peg$c235 = function(f) { return " ";}, - peg$c236 = function(f, c) { return ast.RenderT.TEX_ONLY(f + c); }, - peg$c237 = function(f) { return tu.mediawiki_function_names[f]; }, - peg$c238 = function(f) { return "";}, - peg$c239 = function(f, c) { return ast.RenderT.TEX_ONLY("\\operatorname{" + f.slice(1) + "}" + c); }, - peg$c240 = function(f) { return tu.other_literals1[f]; }, - peg$c241 = function(f) { return ast.RenderT.TEX_ONLY(f + " "); }, - peg$c242 = function(f) { return options.usemathrm && tu.other_literals2[f]; }, - peg$c243 = function(f) { return ast.RenderT.TEX_ONLY("\\mathrm{" + f + "} "); }, - peg$c244 = function(mathrm) { return options.usemathrm && mathrm === "\\mathrm"; }, - peg$c245 = function(mathrm, f) { return options.usemathrm && tu.other_literals2[f]; }, - peg$c246 = function(mathrm, f) { return options.usemathrm && ast.RenderT.TEX_ONLY("\\mathrm{" + f + "} "); }, - peg$c247 = function(f) { return tu.other_literals2[f]; }, - peg$c248 = function(f) { return ast.RenderT.TEX_ONLY("\\mbox{" + f + "} "); }, - peg$c249 = function(mbox) { return mbox === "\\mbox"; }, - peg$c250 = function(mbox, f) { return tu.other_literals2[f]; }, - peg$c251 = function(mbox, f) { return ast.RenderT.TEX_ONLY("\\mbox{" + f + "} "); }, - peg$c252 = function(f) { return ast.RenderT.TEX_ONLY(f); }, - peg$c253 = "\\", - peg$c254 = peg$literalExpectation("\\", false), - peg$c255 = /^[, ;!_#%$&]/, - peg$c256 = peg$classExpectation([",", " ", ";", "!", "_", "#", "%", "$", "&"], false, false), - peg$c257 = function(c) { return ast.RenderT.TEX_ONLY("\\" + c); }, - peg$c258 = /^[><~]/, - peg$c259 = peg$classExpectation([">", "<", "~"], false, false), - peg$c260 = /^[%$]/, - peg$c261 = peg$classExpectation(["%", "$"], false, false), - peg$c262 = function(c) { return ast.RenderT.TEX_ONLY("\\" + c); /* escape dangerous chars */}, - peg$c263 = function(f) { return ast.RenderT.TEX_ONLY(tu.other_literals3[f] + " "); }, - peg$c264 = /^[{}|]/, - peg$c265 = peg$classExpectation(["{", "}", "|"], false, false), - peg$c266 = function(f) { return tu.other_delimiters1[f]; }, - peg$c267 = function(f) { return tu.other_delimiters2[f]; }, - peg$c268 = function(f) { var p = peg$parse(tu.other_delimiters2[f]); + peg$c148 = function() { return ast.Tex.LITERAL(ast.RenderT.TEX_ONLY("")); }, + peg$c149 = function(cs, m) { m.head[0].unshift(cs); return m; }, + peg$c150 = function(as, m) { m.head[0].unshift(as); return m; }, + peg$c151 = function(l, m) { return m; }, + peg$c152 = function(l, tail) { return { head: lst2arr(l), tail: tail }; }, + peg$c153 = function(f, l) { l.head.unshift(ast.Tex.LITERAL(ast.RenderT.TEX_ONLY(f + " "))); return l;}, + peg$c154 = function(e, l) { return l; }, + peg$c155 = function(e, tail) { return { head: e.toArray(), tail: tail }; }, + peg$c156 = function(f, m) { m.head.unshift(ast.Tex.LITERAL(ast.RenderT.TEX_ONLY(f + " "))); return m; }, + peg$c157 = function(e) { return { head: e.toArray(), tail: null }; }, + peg$c158 = function() { return text(); }, + peg$c159 = function(cs) { return ast.Tex.CURLY([ast.Tex.LITERAL(ast.RenderT.TEX_ONLY(cs))]); }, + peg$c160 = /^[lrc]/, + peg$c161 = peg$classExpectation(["l", "r", "c"], false, false), + peg$c162 = "p", + peg$c163 = peg$literalExpectation("p", false), + peg$c164 = "*", + peg$c165 = peg$literalExpectation("*", false), + peg$c166 = /^[0-9]/, + peg$c167 = peg$classExpectation([["0", "9"]], false, false), + peg$c168 = "||", + peg$c169 = peg$literalExpectation("||", false), + peg$c170 = "|", + peg$c171 = peg$literalExpectation("|", false), + peg$c172 = "@", + peg$c173 = peg$literalExpectation("@", false), + peg$c174 = function(num) { return ast.Tex.CURLY([ast.Tex.LITERAL(ast.RenderT.TEX_ONLY(num))]); }, + peg$c175 = /^[tcb]/, + peg$c176 = peg$classExpectation(["t", "c", "b"], false, false), + peg$c177 = /^[a-zA-Z]/, + peg$c178 = peg$classExpectation([["a", "z"], ["A", "Z"]], false, false), + peg$c179 = /^[,:;?!']/, + peg$c180 = peg$classExpectation([",", ":", ";", "?", "!", "'"], false, false), + peg$c181 = /^[().]/, + peg$c182 = peg$classExpectation(["(", ")", "."], false, false), + peg$c183 = /^[\-+*=]/, + peg$c184 = peg$classExpectation(["-", "+", "*", "="], false, false), + peg$c185 = /^[\/|]/, + peg$c186 = peg$classExpectation(["/", "|"], false, false), + peg$c187 = "-", + peg$c188 = peg$literalExpectation("-", false), + peg$c189 = ".", + peg$c190 = peg$literalExpectation(".", false), + peg$c191 = "pt", + peg$c192 = peg$literalExpectation("pt", false), + peg$c193 = "pc", + peg$c194 = peg$literalExpectation("pc", false), + peg$c195 = "in", + peg$c196 = peg$literalExpectation("in", false), + peg$c197 = "cm", + peg$c198 = peg$literalExpectation("cm", false), + peg$c199 = "bp", + peg$c200 = peg$literalExpectation("bp", false), + peg$c201 = "mm", + peg$c202 = peg$literalExpectation("mm", false), + peg$c203 = "dd", + peg$c204 = peg$literalExpectation("dd", false), + peg$c205 = "cc", + peg$c206 = peg$literalExpectation("cc", false), + peg$c207 = "sp", + peg$c208 = peg$literalExpectation("sp", false), + peg$c209 = "ex", + peg$c210 = peg$literalExpectation("ex", false), + peg$c211 = "em", + peg$c212 = peg$literalExpectation("em", false), + peg$c213 = "mu", + peg$c214 = peg$literalExpectation("mu", false), + peg$c215 = "px", + peg$c216 = peg$literalExpectation("px", false), + peg$c217 = /^[@]/, + peg$c218 = peg$classExpectation(["@"], false, false), + peg$c219 = /^[\-0-9a-zA-Z+*,=():\/;?.!'` \x80-\uD7FF\uE000-\uFFFF]/, + peg$c220 = peg$classExpectation(["-", ["0", "9"], ["a", "z"], ["A", "Z"], "+", "*", ",", "=", "(", ")", ":", "/", ";", "?", ".", "!", "'", "`", " ", ["\x80", "\uD7FF"], ["\uE000", "\uFFFF"]], false, false), + peg$c221 = /^[\uD800-\uDBFF]/, + peg$c222 = peg$classExpectation([["\uD800", "\uDBFF"]], false, false), + peg$c223 = /^[\uDC00-\uDFFF]/, + peg$c224 = peg$classExpectation([["\uDC00", "\uDFFF"]], false, false), + peg$c225 = function(l, h) { return text(); }, + peg$c226 = function(b) { return tu.box_functions[b]; }, + peg$c227 = function(b, cs) { return ast.Tex.BOX(b, cs.join('')); }, + peg$c228 = function(c) { return ast.RenderT.TEX_ONLY(c); }, + peg$c229 = function(f) { return tu.latex_function_names[f]; }, + peg$c230 = "(", + peg$c231 = peg$literalExpectation("(", false), + peg$c232 = "\\{", + peg$c233 = peg$literalExpectation("\\{", false), + peg$c234 = function(f) { return " ";}, + peg$c235 = function(f, c) { return ast.RenderT.TEX_ONLY(f + c); }, + peg$c236 = function(f) { return tu.mediawiki_function_names[f]; }, + peg$c237 = function(f) { return "";}, + peg$c238 = function(f, c) { return ast.RenderT.TEX_ONLY("\\operatorname{" + f.slice(1) + "}" + c); }, + peg$c239 = function(f) { return tu.other_literals1[f]; }, + peg$c240 = function(f) { return ast.RenderT.TEX_ONLY(f + " "); }, + peg$c241 = function(f) { return options.usemathrm && tu.other_literals2[f]; }, + peg$c242 = function(f) { return ast.RenderT.TEX_ONLY("\\mathrm{" + f + "} "); }, + peg$c243 = function(mathrm) { return options.usemathrm && mathrm === "\\mathrm"; }, + peg$c244 = function(mathrm, f) { return options.usemathrm && tu.other_literals2[f]; }, + peg$c245 = function(mathrm, f) { return options.usemathrm && ast.RenderT.TEX_ONLY("\\mathrm{" + f + "} "); }, + peg$c246 = function(f) { return tu.other_literals2[f]; }, + peg$c247 = function(f) { return ast.RenderT.TEX_ONLY("\\mbox{" + f + "} "); }, + peg$c248 = function(mbox) { return mbox === "\\mbox"; }, + peg$c249 = function(mbox, f) { return tu.other_literals2[f]; }, + peg$c250 = function(mbox, f) { return ast.RenderT.TEX_ONLY("\\mbox{" + f + "} "); }, + peg$c251 = function(f) { return ast.RenderT.TEX_ONLY(f); }, + peg$c252 = "\\", + peg$c253 = peg$literalExpectation("\\", false), + peg$c254 = /^[, ;!_#%$&]/, + peg$c255 = peg$classExpectation([",", " ", ";", "!", "_", "#", "%", "$", "&"], false, false), + peg$c256 = function(c) { return ast.RenderT.TEX_ONLY("\\" + c); }, + peg$c257 = /^[><~]/, + peg$c258 = peg$classExpectation([">", "<", "~"], false, false), + peg$c259 = /^[%$]/, + peg$c260 = peg$classExpectation(["%", "$"], false, false), + peg$c261 = function(c) { return ast.RenderT.TEX_ONLY("\\" + c); /* escape dangerous chars */}, + peg$c262 = function(f) { return ast.RenderT.TEX_ONLY(tu.other_literals3[f] + " "); }, + peg$c263 = /^[{}|]/, + peg$c264 = peg$classExpectation(["{", "}", "|"], false, false), + peg$c265 = function(f) { return tu.other_delimiters1[f]; }, + peg$c266 = function(f) { return tu.other_delimiters2[f]; }, + peg$c267 = function(f) { var p = peg$parse(tu.other_delimiters2[f]); console.assert(Array.isArray(p) && p.length === 1); console.assert(p[0].constructor === ast.Tex.LITERAL); console.assert(p[0][0].constructor === ast.RenderT.TEX_ONLY); return p[0][0]; }, - peg$c269 = function(c) { return ast.RenderT.TEX_ONLY(""); }, - peg$c270 = function(f) { return tu.fun_ar1nb[f]; }, - peg$c271 = function(f) { return f; }, - peg$c272 = function(f) { return tu.fun_ar1opt[f]; }, - peg$c273 = "&", - peg$c274 = peg$literalExpectation("&", false), - peg$c275 = "\\\\", - peg$c276 = peg$literalExpectation("\\\\", false), - peg$c277 = "\\begin", - peg$c278 = peg$literalExpectation("\\begin", false), - peg$c279 = "\\end", - peg$c280 = peg$literalExpectation("\\end", false), - peg$c281 = "{matrix}", - peg$c282 = peg$literalExpectation("{matrix}", false), - peg$c283 = "{pmatrix}", - peg$c284 = peg$literalExpectation("{pmatrix}", false), - peg$c285 = "{bmatrix}", - peg$c286 = peg$literalExpectation("{bmatrix}", false), - peg$c287 = "{Bmatrix}", - peg$c288 = peg$literalExpectation("{Bmatrix}", false), - peg$c289 = "{vmatrix}", - peg$c290 = peg$literalExpectation("{vmatrix}", false), - peg$c291 = "{Vmatrix}", - peg$c292 = peg$literalExpectation("{Vmatrix}", false), - peg$c293 = "{array}", - peg$c294 = peg$literalExpectation("{array}", false), - peg$c295 = "{align}", - peg$c296 = peg$literalExpectation("{align}", false), - peg$c297 = "{aligned}", - peg$c298 = peg$literalExpectation("{aligned}", false), - peg$c299 = "{alignat}", - peg$c300 = peg$literalExpectation("{alignat}", false), - peg$c301 = "{alignedat}", - peg$c302 = peg$literalExpectation("{alignedat}", false), - peg$c303 = "{smallmatrix}", - peg$c304 = peg$literalExpectation("{smallmatrix}", false), - peg$c305 = "{cases}", - peg$c306 = peg$literalExpectation("{cases}", false), - peg$c307 = "{multline}", - peg$c308 = peg$literalExpectation("{multline}", false), - peg$c309 = "{multline*}", - peg$c310 = peg$literalExpectation("{multline*}", false), - peg$c311 = "\\big(", - peg$c312 = peg$literalExpectation("\\big(", false), - peg$c313 = "\\Big(", - peg$c314 = peg$literalExpectation("\\Big(", false), - peg$c315 = "\\bigg(", - peg$c316 = peg$literalExpectation("\\bigg(", false), - peg$c317 = "\\Bigg(", - peg$c318 = peg$literalExpectation("\\Bigg(", false), - peg$c319 = "\\bigl(", - peg$c320 = peg$literalExpectation("\\bigl(", false), - peg$c321 = "\\Bigl(", - peg$c322 = peg$literalExpectation("\\Bigl(", false), - peg$c323 = "\\bigg1(", - peg$c324 = peg$literalExpectation("\\bigg1(", false), - peg$c325 = "\\Biggl(", - peg$c326 = peg$literalExpectation("\\Biggl(", false), - peg$c327 = "\\left(", - peg$c328 = peg$literalExpectation("\\left(", false), - peg$c329 = ")", - peg$c330 = peg$literalExpectation(")", false), - peg$c331 = "\\big)", - peg$c332 = peg$literalExpectation("\\big)", false), - peg$c333 = "\\Big)", - peg$c334 = peg$literalExpectation("\\Big)", false), - peg$c335 = "\\bigg)", - peg$c336 = peg$literalExpectation("\\bigg)", false), - peg$c337 = "\\Bigg)", - peg$c338 = peg$literalExpectation("\\Bigg)", false), - peg$c339 = "\\bigr)", - peg$c340 = peg$literalExpectation("\\bigr)", false), - peg$c341 = "\\Bigr)", - peg$c342 = peg$literalExpectation("\\Bigr)", false), - peg$c343 = "\\biggr)", - peg$c344 = peg$literalExpectation("\\biggr)", false), - peg$c345 = "\\Biggr)", - peg$c346 = peg$literalExpectation("\\Biggr)", false), - peg$c347 = "\\right)", - peg$c348 = peg$literalExpectation("\\right)", false), - peg$c349 = function(f) { return tu.big_literals[f]; }, - peg$c350 = function(f) { return tu.paren[f]; }, - peg$c351 = function(f) { return tu.fun_ar1[f]; }, - peg$c352 = function(f) { return tu.other_fun_ar1[f]; }, - peg$c353 = function(f) { return tu.fun_ar2[f]; }, - peg$c354 = function(f) { return tu.fun_ar3[f]; }, - peg$c355 = function(f) { return tu.fun_infix[f]; }, - peg$c356 = function(f) { return tu.jacobi[f]; }, - peg$c357 = function(f) { return tu.laguerre[f]; }, - peg$c358 = "sn", - peg$c359 = peg$literalExpectation("sn", false), - peg$c360 = "cn", - peg$c361 = peg$literalExpectation("cn", false), - peg$c362 = "dn", - peg$c363 = peg$literalExpectation("dn", false), - peg$c364 = function(f) { return tu.declh_function[f]; }, - peg$c365 = function(f) { return ast.Tex.DECLh(f, ast.FontForce.RM(), []); /*see bug 54818*/ }, - peg$c366 = function(f) { return tu.fun_ar2nb[f]; }, - peg$c367 = function(f) { return tu.left_function[f]; }, - peg$c368 = function(f) { return tu.right_function[f]; }, - peg$c369 = function(f) { return tu.hline_function[f]; }, - peg$c370 = function(f) { return tu.color_function[f]; }, - peg$c371 = function(f, cs) { return f + cs; }, - peg$c372 = function(f) { return tu.definecolor_function[f]; }, - peg$c373 = "named", - peg$c374 = peg$literalExpectation("named", true), - peg$c375 = function(f, name, cs) { return "{named}" + cs; }, - peg$c376 = "gray", - peg$c377 = peg$literalExpectation("gray", true), - peg$c378 = function(f, name, cs) { return "{gray}" + cs; }, - peg$c379 = "rgb", - peg$c380 = peg$literalExpectation("rgb", false), - peg$c381 = function(f, name, cs) { return "{rgb}" + cs; }, - peg$c382 = "RGB", - peg$c383 = peg$literalExpectation("RGB", false), - peg$c384 = "cmyk", - peg$c385 = peg$literalExpectation("cmyk", true), - peg$c386 = function(f, name, cs) { return "{cmyk}" + cs; }, - peg$c387 = function(f, name, a) { return f + "{" + name.join('') + "}" + a; }, - peg$c388 = function(cs) { return "[named]" + cs; }, - peg$c389 = function(cs) { return "[gray]" + cs; }, - peg$c390 = function(cs) { return "[rgb]" + cs; }, - peg$c391 = function(cs) { return "[cmyk]" + cs; }, - peg$c392 = function(name) { return "{" + name.join('') + "}"; }, - peg$c393 = function(k) { return "{"+k+"}"; }, - peg$c394 = function(r, g, b) { return "{"+r+","+g+","+b+"}"; }, - peg$c395 = function(c, m, y, k) { return "{"+c+","+m+","+y+","+k+"}"; }, - peg$c396 = "0", - peg$c397 = peg$literalExpectation("0", false), - peg$c398 = /^[1-9]/, - peg$c399 = peg$classExpectation([["1", "9"]], false, false), - peg$c400 = function(n) { return parseInt(n, 10) <= 255; }, - peg$c401 = function(n) { return n / 255; }, - peg$c402 = function(n) { return n; }, - peg$c403 = /^[01]/, - peg$c404 = peg$classExpectation(["0", "1"], false, false), - peg$c405 = function() { return false; }, - peg$c406 = function() { return peg$currPos === input.length; }, + peg$c268 = function(c) { return ast.RenderT.TEX_ONLY(""); }, + peg$c269 = function(f) { return tu.fun_ar1nb[f]; }, + peg$c270 = function(f) { return f; }, + peg$c271 = function(f) { return tu.fun_ar1opt[f]; }, + peg$c272 = "&", + peg$c273 = peg$literalExpectation("&", false), + peg$c274 = "\\\\", + peg$c275 = peg$literalExpectation("\\\\", false), + peg$c276 = "\\begin", + peg$c277 = peg$literalExpectation("\\begin", false), + peg$c278 = "\\end", + peg$c279 = peg$literalExpectation("\\end", false), + peg$c280 = "{matrix}", + peg$c281 = peg$literalExpectation("{matrix}", false), + peg$c282 = "{pmatrix}", + peg$c283 = peg$literalExpectation("{pmatrix}", false), + peg$c284 = "{bmatrix}", + peg$c285 = peg$literalExpectation("{bmatrix}", false), + peg$c286 = "{Bmatrix}", + peg$c287 = peg$literalExpectation("{Bmatrix}", false), + peg$c288 = "{vmatrix}", + peg$c289 = peg$literalExpectation("{vmatrix}", false), + peg$c290 = "{Vmatrix}", + peg$c291 = peg$literalExpectation("{Vmatrix}", false), + peg$c292 = "{array}", + peg$c293 = peg$literalExpectation("{array}", false), + peg$c294 = "{align}", + peg$c295 = peg$literalExpectation("{align}", false), + peg$c296 = "{aligned}", + peg$c297 = peg$literalExpectation("{aligned}", false), + peg$c298 = "{alignat}", + peg$c299 = peg$literalExpectation("{alignat}", false), + peg$c300 = "{alignedat}", + peg$c301 = peg$literalExpectation("{alignedat}", false), + peg$c302 = "{smallmatrix}", + peg$c303 = peg$literalExpectation("{smallmatrix}", false), + peg$c304 = "{cases}", + peg$c305 = peg$literalExpectation("{cases}", false), + peg$c306 = "{multline}", + peg$c307 = peg$literalExpectation("{multline}", false), + peg$c308 = "\\big(", + peg$c309 = peg$literalExpectation("\\big(", false), + peg$c310 = "\\Big(", + peg$c311 = peg$literalExpectation("\\Big(", false), + peg$c312 = "\\bigg(", + peg$c313 = peg$literalExpectation("\\bigg(", false), + peg$c314 = "\\Bigg(", + peg$c315 = peg$literalExpectation("\\Bigg(", false), + peg$c316 = "\\bigl(", + peg$c317 = peg$literalExpectation("\\bigl(", false), + peg$c318 = "\\Bigl(", + peg$c319 = peg$literalExpectation("\\Bigl(", false), + peg$c320 = "\\bigg1(", + peg$c321 = peg$literalExpectation("\\bigg1(", false), + peg$c322 = "\\Biggl(", + peg$c323 = peg$literalExpectation("\\Biggl(", false), + peg$c324 = "\\left(", + peg$c325 = peg$literalExpectation("\\left(", false), + peg$c326 = ")", + peg$c327 = peg$literalExpectation(")", false), + peg$c328 = "\\big)", + peg$c329 = peg$literalExpectation("\\big)", false), + peg$c330 = "\\Big)", + peg$c331 = peg$literalExpectation("\\Big)", false), + peg$c332 = "\\bigg)", + peg$c333 = peg$literalExpectation("\\bigg)", false), + peg$c334 = "\\Bigg)", + peg$c335 = peg$literalExpectation("\\Bigg)", false), + peg$c336 = "\\bigr)", + peg$c337 = peg$literalExpectation("\\bigr)", false), + peg$c338 = "\\Bigr)", + peg$c339 = peg$literalExpectation("\\Bigr)", false), + peg$c340 = "\\biggr)", + peg$c341 = peg$literalExpectation("\\biggr)", false), + peg$c342 = "\\Biggr)", + peg$c343 = peg$literalExpectation("\\Biggr)", false), + peg$c344 = "\\right)", + peg$c345 = peg$literalExpectation("\\right)", false), + peg$c346 = function(f) { return tu.big_literals[f]; }, + peg$c347 = function(f) { return tu.paren[f]; }, + peg$c348 = function(f) { return tu.fun_ar1[f]; }, + peg$c349 = function(f) { return tu.other_fun_ar1[f]; }, + peg$c350 = function(f) { return tu.fun_ar2[f]; }, + peg$c351 = function(f) { return tu.fun_ar3[f]; }, + peg$c352 = function(f) { return tu.fun_infix[f]; }, + peg$c353 = function(f) { return tu.jacobi[f]; }, + peg$c354 = function(f) { return tu.laguerre[f]; }, + peg$c355 = "sn", + peg$c356 = peg$literalExpectation("sn", false), + peg$c357 = "cn", + peg$c358 = peg$literalExpectation("cn", false), + peg$c359 = "dn", + peg$c360 = peg$literalExpectation("dn", false), + peg$c361 = function(f) { return tu.declh_function[f]; }, + peg$c362 = function(f) { return ast.Tex.DECLh(f, ast.FontForce.RM(), []); /*see bug 54818*/ }, + peg$c363 = function(f) { return tu.fun_ar2nb[f]; }, + peg$c364 = function(f) { return tu.left_function[f]; }, + peg$c365 = function(f) { return tu.right_function[f]; }, + peg$c366 = function(f) { return tu.hline_function[f]; }, + peg$c367 = function(f) { return tu.color_function[f]; }, + peg$c368 = function(f, cs) { return f + cs; }, + peg$c369 = function(f) { return tu.definecolor_function[f]; }, + peg$c370 = "named", + peg$c371 = peg$literalExpectation("named", true), + peg$c372 = function(f, name, cs) { return "{named}" + cs; }, + peg$c373 = "gray", + peg$c374 = peg$literalExpectation("gray", true), + peg$c375 = function(f, name, cs) { return "{gray}" + cs; }, + peg$c376 = "rgb", + peg$c377 = peg$literalExpectation("rgb", false), + peg$c378 = function(f, name, cs) { return "{rgb}" + cs; }, + peg$c379 = "RGB", + peg$c380 = peg$literalExpectation("RGB", false), + peg$c381 = "cmyk", + peg$c382 = peg$literalExpectation("cmyk", true), + peg$c383 = function(f, name, cs) { return "{cmyk}" + cs; }, + peg$c384 = function(f, name, a) { return f + "{" + name.join('') + "}" + a; }, + peg$c385 = function(cs) { return "[named]" + cs; }, + peg$c386 = function(cs) { return "[gray]" + cs; }, + peg$c387 = function(cs) { return "[rgb]" + cs; }, + peg$c388 = function(cs) { return "[cmyk]" + cs; }, + peg$c389 = function(name) { return "{" + name.join('') + "}"; }, + peg$c390 = function(k) { return "{"+k+"}"; }, + peg$c391 = function(r, g, b) { return "{"+r+","+g+","+b+"}"; }, + peg$c392 = function(c, m, y, k) { return "{"+c+","+m+","+y+","+k+"}"; }, + peg$c393 = "0", + peg$c394 = peg$literalExpectation("0", false), + peg$c395 = /^[1-9]/, + peg$c396 = peg$classExpectation([["1", "9"]], false, false), + peg$c397 = function(n) { return parseInt(n, 10) <= 255; }, + peg$c398 = function(n) { return n / 255; }, + peg$c399 = function(n) { return n; }, + peg$c400 = /^[01]/, + peg$c401 = peg$classExpectation(["0", "1"], false, false), + peg$c402 = function() { return false; }, + peg$c403 = function() { return peg$currPos === input.length; }, peg$currPos = 0, peg$savedPos = 0, @@ -712,7 +709,7 @@ module.exports = /* function peg$parsestart() { var s0, s1, s2; - var key = peg$currPos * 121 + 0, + var key = peg$currPos * 119 + 0, cached = peg$resultsCache[key]; if (cached) { @@ -746,7 +743,7 @@ module.exports = /* function peg$parse_() { var s0, s1; - var key = peg$currPos * 121 + 1, + var key = peg$currPos * 119 + 1, cached = peg$resultsCache[key]; if (cached) { @@ -782,7 +779,7 @@ module.exports = /* function peg$parsespace() { var s0, s1, s2, s3, s4, s5, s6, s7, s8; - var key = peg$currPos * 121 + 2, + var key = peg$currPos * 119 + 2, cached = peg$resultsCache[key]; if (cached) { @@ -1172,7 +1169,7 @@ module.exports = /* function peg$parsetex_expr() { var s0, s1, s2, s3, s4; - var key = peg$currPos * 121 + 3, + var key = peg$currPos * 119 + 3, cached = peg$resultsCache[key]; if (cached) { @@ -1266,7 +1263,7 @@ module.exports = /* function peg$parseexpr() { var s0, s1; - var key = peg$currPos * 121 + 4, + var key = peg$currPos * 119 + 4, cached = peg$resultsCache[key]; if (cached) { @@ -1294,7 +1291,7 @@ module.exports = /* function peg$parsene_expr() { var s0, s1, s2; - var key = peg$currPos * 121 + 5, + var key = peg$currPos * 119 + 5, cached = peg$resultsCache[key]; if (cached) { @@ -1364,7 +1361,7 @@ module.exports = /* function peg$parselitsq_aq() { var s0; - var key = peg$currPos * 121 + 6, + var key = peg$currPos * 119 + 6, cached = peg$resultsCache[key]; if (cached) { @@ -1392,7 +1389,7 @@ module.exports = /* function peg$parselitsq_fq() { var s0, s1, s2, s3; - var key = peg$currPos * 121 + 7, + var key = peg$currPos * 119 + 7, cached = peg$resultsCache[key]; if (cached) { @@ -1456,7 +1453,7 @@ module.exports = /* function peg$parselitsq_uq() { var s0, s1, s2, s3; - var key = peg$currPos * 121 + 8, + var key = peg$currPos * 119 + 8, cached = peg$resultsCache[key]; if (cached) { @@ -1496,7 +1493,7 @@ module.exports = /* function peg$parselitsq_dq() { var s0, s1, s2, s3; - var key = peg$currPos * 121 + 9, + var key = peg$currPos * 119 + 9, cached = peg$resultsCache[key]; if (cached) { @@ -1536,7 +1533,7 @@ module.exports = /* function peg$parselitsq_zq() { var s0, s1; - var key = peg$currPos * 121 + 10, + var key = peg$currPos * 119 + 10, cached = peg$resultsCache[key]; if (cached) { @@ -1561,7 +1558,7 @@ module.exports = /* function peg$parseexpr_nosqc() { var s0, s1, s2; - var key = peg$currPos * 121 + 11, + var key = peg$currPos * 119 + 11, cached = peg$resultsCache[key]; if (cached) { @@ -1604,7 +1601,7 @@ module.exports = /* function peg$parselit_aq() { var s0; - var key = peg$currPos * 121 + 12, + var key = peg$currPos * 119 + 12, cached = peg$resultsCache[key]; if (cached) { @@ -1638,7 +1635,7 @@ module.exports = /* function peg$parselit_fq() { var s0, s1, s2, s3; - var key = peg$currPos * 121 + 13, + var key = peg$currPos * 119 + 13, cached = peg$resultsCache[key]; if (cached) { @@ -1726,7 +1723,7 @@ module.exports = /* function peg$parselit_uq() { var s0, s1, s2, s3; - var key = peg$currPos * 121 + 14, + var key = peg$currPos * 119 + 14, cached = peg$resultsCache[key]; if (cached) { @@ -1766,7 +1763,7 @@ module.exports = /* function peg$parselit_dq() { var s0, s1, s2, s3; - var key = peg$currPos * 121 + 15, + var key = peg$currPos * 119 + 15, cached = peg$resultsCache[key]; if (cached) { @@ -1806,7 +1803,7 @@ module.exports = /* function peg$parselit_uqn() { var s0, s1, s2; - var key = peg$currPos * 121 + 16, + var key = peg$currPos * 119 + 16, cached = peg$resultsCache[key]; if (cached) { @@ -1840,7 +1837,7 @@ module.exports = /* function peg$parselit_dqn() { var s0, s1, s2; - var key = peg$currPos * 121 + 17, + var key = peg$currPos * 119 + 17, cached = peg$resultsCache[key]; if (cached) { @@ -1874,7 +1871,7 @@ module.exports = /* function peg$parseleft() { var s0, s1, s2; - var key = peg$currPos * 121 + 18, + var key = peg$currPos * 119 + 18, cached = peg$resultsCache[key]; if (cached) { @@ -1926,7 +1923,7 @@ module.exports = /* function peg$parseright() { var s0, s1, s2; - var key = peg$currPos * 121 + 19, + var key = peg$currPos * 119 + 19, cached = peg$resultsCache[key]; if (cached) { @@ -1978,7 +1975,7 @@ module.exports = /* function peg$parselit() { var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, s14, s15, s16, s17, s18; - var key = peg$currPos * 121 + 20, + var key = peg$currPos * 119 + 20, cached = peg$resultsCache[key]; if (cached) { @@ -3562,14 +3559,35 @@ module.exports = /* } if (s0 === peg$FAILED) { s0 = peg$currPos; - s1 = peg$parseBEGIN_MULTLINE_STAR(); + if (input.substr(peg$currPos, 7) === peg$c134) { + s1 = peg$c134; + peg$currPos += 7; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c135); } + } if (s1 !== peg$FAILED) { - s2 = peg$parsemultline(); + s2 = []; + s3 = peg$parsealpha(); + if (s3 !== peg$FAILED) { + while (s3 !== peg$FAILED) { + s2.push(s3); + s3 = peg$parsealpha(); + } + } else { + s2 = peg$FAILED; + } if (s2 !== peg$FAILED) { - s3 = peg$parseEND_MULTLINE_STAR(); + if (input.charCodeAt(peg$currPos) === 125) { + s3 = peg$c37; + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c38); } + } if (s3 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c134(s2); + s1 = peg$c136(); s0 = s1; } else { peg$currPos = s0; @@ -3585,40 +3603,19 @@ module.exports = /* } if (s0 === peg$FAILED) { s0 = peg$currPos; - if (input.substr(peg$currPos, 7) === peg$c135) { - s1 = peg$c135; - peg$currPos += 7; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c136); } - } + s1 = peg$parsegeneric_func(); if (s1 !== peg$FAILED) { - s2 = []; - s3 = peg$parsealpha(); - if (s3 !== peg$FAILED) { - while (s3 !== peg$FAILED) { - s2.push(s3); - s3 = peg$parsealpha(); - } + peg$savedPos = peg$currPos; + s2 = peg$c137(s1); + if (s2) { + s2 = void 0; } else { s2 = peg$FAILED; } if (s2 !== peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 125) { - s3 = peg$c37; - peg$currPos++; - } else { - s3 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c38); } - } - if (s3 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c137(); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } + peg$savedPos = s0; + s1 = peg$c138(s1); + s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; @@ -3627,30 +3624,6 @@ module.exports = /* peg$currPos = s0; s0 = peg$FAILED; } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parsegeneric_func(); - if (s1 !== peg$FAILED) { - peg$savedPos = peg$currPos; - s2 = peg$c138(s1); - if (s2) { - s2 = void 0; - } else { - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c139(s1); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } } } } @@ -3705,7 +3678,7 @@ module.exports = /* function peg$parselitstuff() { var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, s14, s15, s16, s17, s18; - var key = peg$currPos * 121 + 21, + var key = peg$currPos * 119 + 21, cached = peg$resultsCache[key]; if (cached) { @@ -4500,7 +4473,7 @@ module.exports = /* s2 = peg$parselit(); if (s2 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c140(s1, s2); + s1 = peg$c139(s1, s2); s0 = s1; } else { peg$currPos = s0; @@ -4517,7 +4490,7 @@ module.exports = /* s2 = peg$parselit(); if (s2 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c141(s1, s2); + s1 = peg$c140(s1, s2); s0 = s1; } else { peg$currPos = s0; @@ -4582,7 +4555,7 @@ module.exports = /* s3 = peg$parselit(); if (s3 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c142(s1, s2, s3); + s1 = peg$c141(s1, s2, s3); s0 = s1; } else { peg$currPos = s0; @@ -4607,7 +4580,7 @@ module.exports = /* s4 = peg$parselit(); if (s4 !== peg$FAILED) { peg$savedPos = peg$currPos; - s5 = peg$c143(s1, s2, s3, s4); + s5 = peg$c142(s1, s2, s3, s4); if (s5) { s5 = void 0; } else { @@ -5313,14 +5286,35 @@ module.exports = /* } if (s0 === peg$FAILED) { s0 = peg$currPos; - s1 = peg$parseBEGIN_MULTLINE_STAR(); + if (input.substr(peg$currPos, 7) === peg$c134) { + s1 = peg$c134; + peg$currPos += 7; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c135); } + } if (s1 !== peg$FAILED) { - s2 = peg$parsemultline(); + s2 = []; + s3 = peg$parsealpha(); + if (s3 !== peg$FAILED) { + while (s3 !== peg$FAILED) { + s2.push(s3); + s3 = peg$parsealpha(); + } + } else { + s2 = peg$FAILED; + } if (s2 !== peg$FAILED) { - s3 = peg$parseEND_MULTLINE_STAR(); + if (input.charCodeAt(peg$currPos) === 125) { + s3 = peg$c37; + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c38); } + } if (s3 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c134(s2); + s1 = peg$c136(); s0 = s1; } else { peg$currPos = s0; @@ -5336,40 +5330,19 @@ module.exports = /* } if (s0 === peg$FAILED) { s0 = peg$currPos; - if (input.substr(peg$currPos, 7) === peg$c135) { - s1 = peg$c135; - peg$currPos += 7; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c136); } - } + s1 = peg$parsegeneric_func(); if (s1 !== peg$FAILED) { - s2 = []; - s3 = peg$parsealpha(); - if (s3 !== peg$FAILED) { - while (s3 !== peg$FAILED) { - s2.push(s3); - s3 = peg$parsealpha(); - } + peg$savedPos = peg$currPos; + s2 = peg$c137(s1); + if (s2) { + s2 = void 0; } else { s2 = peg$FAILED; } if (s2 !== peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 125) { - s3 = peg$c37; - peg$currPos++; - } else { - s3 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c38); } - } - if (s3 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c137(); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } + peg$savedPos = s0; + s1 = peg$c143(s1); + s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; @@ -5380,36 +5353,12 @@ module.exports = /* } if (s0 === peg$FAILED) { s0 = peg$currPos; - s1 = peg$parsegeneric_func(); + s1 = peg$parseLITERALPART(); if (s1 !== peg$FAILED) { - peg$savedPos = peg$currPos; - s2 = peg$c138(s1); - if (s2) { - s2 = void 0; - } else { - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c144(s1); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parseLITERALPART(); - if (s1 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c145(s1); - } - s0 = s1; + peg$savedPos = s0; + s1 = peg$c144(s1); } + s0 = s1; } } } @@ -5465,7 +5414,7 @@ module.exports = /* function peg$parselitparen1() { var s0, s1, s2, s3, s4, s5; - var key = peg$currPos * 121 + 22, + var key = peg$currPos * 119 + 22, cached = peg$resultsCache[key]; if (cached) { @@ -5498,7 +5447,7 @@ module.exports = /* } if (s5 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c146(s3); + s1 = peg$c145(s3); s0 = s1; } else { peg$currPos = s0; @@ -5525,7 +5474,7 @@ module.exports = /* s1 = peg$parselitparen(); if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c146(s1); + s1 = peg$c145(s1); } s0 = s1; } @@ -5538,7 +5487,7 @@ module.exports = /* function peg$parselitparen() { var s0, s1, s2, s3, s4, s5; - var key = peg$currPos * 121 + 23, + var key = peg$currPos * 119 + 23, cached = peg$resultsCache[key]; if (cached) { @@ -5559,7 +5508,7 @@ module.exports = /* s5 = peg$parsePAREN_CLOSE(); if (s5 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c147(s3); + s1 = peg$c146(s3); s0 = s1; } else { peg$currPos = s0; @@ -5590,7 +5539,7 @@ module.exports = /* function peg$parselitplus() { var s0, s1, s2; - var key = peg$currPos * 121 + 24, + var key = peg$currPos * 119 + 24, cached = peg$resultsCache[key]; if (cached) { @@ -5603,7 +5552,7 @@ module.exports = /* s1 = peg$parselitstuff(); if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c146(s1); + s1 = peg$c145(s1); } s0 = s1; if (s0 === peg$FAILED) { @@ -5620,7 +5569,7 @@ module.exports = /* } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c148(s1); + s1 = peg$c147(s1); } s0 = s1; if (s0 === peg$FAILED) { @@ -5628,7 +5577,7 @@ module.exports = /* s1 = peg$c50; if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c149(); + s1 = peg$c148(); } s0 = s1; } @@ -5642,7 +5591,7 @@ module.exports = /* function peg$parsearray() { var s0, s1, s2; - var key = peg$currPos * 121 + 25, + var key = peg$currPos * 119 + 25, cached = peg$resultsCache[key]; if (cached) { @@ -5657,7 +5606,7 @@ module.exports = /* s2 = peg$parsematrix(); if (s2 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c150(s1, s2); + s1 = peg$c149(s1, s2); s0 = s1; } else { peg$currPos = s0; @@ -5676,7 +5625,7 @@ module.exports = /* function peg$parsealignat() { var s0, s1, s2; - var key = peg$currPos * 121 + 26, + var key = peg$currPos * 119 + 26, cached = peg$resultsCache[key]; if (cached) { @@ -5691,7 +5640,7 @@ module.exports = /* s2 = peg$parsematrix(); if (s2 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c151(s1, s2); + s1 = peg$c150(s1, s2); s0 = s1; } else { peg$currPos = s0; @@ -5710,7 +5659,7 @@ module.exports = /* function peg$parsematrix() { var s0, s1, s2, s3, s4; - var key = peg$currPos * 121 + 27, + var key = peg$currPos * 119 + 27, cached = peg$resultsCache[key]; if (cached) { @@ -5728,7 +5677,7 @@ module.exports = /* s4 = peg$parsematrix(); if (s4 !== peg$FAILED) { peg$savedPos = s2; - s3 = peg$c152(s1, s4); + s3 = peg$c151(s1, s4); s2 = s3; } else { peg$currPos = s2; @@ -5743,7 +5692,7 @@ module.exports = /* } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c153(s1, s2); + s1 = peg$c152(s1, s2); s0 = s1; } else { peg$currPos = s0; @@ -5762,7 +5711,7 @@ module.exports = /* function peg$parseline_start() { var s0, s1, s2; - var key = peg$currPos * 121 + 28, + var key = peg$currPos * 119 + 28, cached = peg$resultsCache[key]; if (cached) { @@ -5777,7 +5726,7 @@ module.exports = /* s2 = peg$parseline_start(); if (s2 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c154(s1, s2); + s1 = peg$c153(s1, s2); s0 = s1; } else { peg$currPos = s0; @@ -5799,7 +5748,7 @@ module.exports = /* function peg$parseline() { var s0, s1, s2, s3, s4; - var key = peg$currPos * 121 + 29, + var key = peg$currPos * 119 + 29, cached = peg$resultsCache[key]; if (cached) { @@ -5817,7 +5766,7 @@ module.exports = /* s4 = peg$parseline(); if (s4 !== peg$FAILED) { peg$savedPos = s2; - s3 = peg$c155(s1, s4); + s3 = peg$c154(s1, s4); s2 = s3; } else { peg$currPos = s2; @@ -5832,7 +5781,7 @@ module.exports = /* } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c156(s1, s2); + s1 = peg$c155(s1, s2); s0 = s1; } else { peg$currPos = s0; @@ -5851,7 +5800,7 @@ module.exports = /* function peg$parsemultline() { var s0, s1, s2, s3, s4; - var key = peg$currPos * 121 + 30, + var key = peg$currPos * 119 + 30, cached = peg$resultsCache[key]; if (cached) { @@ -5869,7 +5818,7 @@ module.exports = /* s4 = peg$parsemultline(); if (s4 !== peg$FAILED) { peg$savedPos = s2; - s3 = peg$c152(s1, s4); + s3 = peg$c151(s1, s4); s2 = s3; } else { peg$currPos = s2; @@ -5884,7 +5833,7 @@ module.exports = /* } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c153(s1, s2); + s1 = peg$c152(s1, s2); s0 = s1; } else { peg$currPos = s0; @@ -5903,7 +5852,7 @@ module.exports = /* function peg$parsemline_start() { var s0, s1, s2; - var key = peg$currPos * 121 + 31, + var key = peg$currPos * 119 + 31, cached = peg$resultsCache[key]; if (cached) { @@ -5918,7 +5867,7 @@ module.exports = /* s2 = peg$parsemline_start(); if (s2 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c157(s1, s2); + s1 = peg$c156(s1, s2); s0 = s1; } else { peg$currPos = s0; @@ -5933,7 +5882,7 @@ module.exports = /* s1 = peg$parseexpr(); if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c158(s1); + s1 = peg$c157(s1); } s0 = s1; } @@ -5946,7 +5895,7 @@ module.exports = /* function peg$parsecolumn_spec() { var s0, s1, s2, s3, s4; - var key = peg$currPos * 121 + 32, + var key = peg$currPos * 119 + 32, cached = peg$resultsCache[key]; if (cached) { @@ -5971,14 +5920,14 @@ module.exports = /* } if (s3 !== peg$FAILED) { peg$savedPos = s2; - s3 = peg$c159(); + s3 = peg$c158(); } s2 = s3; if (s2 !== peg$FAILED) { s3 = peg$parseCURLY_CLOSE(); if (s3 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c160(s2); + s1 = peg$c159(s2); s0 = s1; } else { peg$currPos = s0; @@ -6001,7 +5950,7 @@ module.exports = /* function peg$parseone_col() { var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9; - var key = peg$currPos * 121 + 33, + var key = peg$currPos * 119 + 33, cached = peg$resultsCache[key]; if (cached) { @@ -6011,12 +5960,12 @@ module.exports = /* } s0 = peg$currPos; - if (peg$c161.test(input.charAt(peg$currPos))) { + if (peg$c160.test(input.charAt(peg$currPos))) { s1 = input.charAt(peg$currPos); peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c162); } + if (peg$silentFails === 0) { peg$fail(peg$c161); } } if (s1 !== peg$FAILED) { s2 = peg$parse_(); @@ -6034,11 +5983,11 @@ module.exports = /* if (s0 === peg$FAILED) { s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 112) { - s1 = peg$c163; + s1 = peg$c162; peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c164); } + if (peg$silentFails === 0) { peg$fail(peg$c163); } } if (s1 !== peg$FAILED) { s2 = peg$parseCURLY_OPEN(); @@ -6077,32 +6026,32 @@ module.exports = /* if (s0 === peg$FAILED) { s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 42) { - s1 = peg$c165; + s1 = peg$c164; peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c166); } + if (peg$silentFails === 0) { peg$fail(peg$c165); } } if (s1 !== peg$FAILED) { s2 = peg$parseCURLY_OPEN(); if (s2 !== peg$FAILED) { s3 = []; - if (peg$c167.test(input.charAt(peg$currPos))) { + if (peg$c166.test(input.charAt(peg$currPos))) { s4 = input.charAt(peg$currPos); peg$currPos++; } else { s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c168); } + if (peg$silentFails === 0) { peg$fail(peg$c167); } } if (s4 !== peg$FAILED) { while (s4 !== peg$FAILED) { s3.push(s4); - if (peg$c167.test(input.charAt(peg$currPos))) { + if (peg$c166.test(input.charAt(peg$currPos))) { s4 = input.charAt(peg$currPos); peg$currPos++; } else { s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c168); } + if (peg$silentFails === 0) { peg$fail(peg$c167); } } } } else { @@ -6175,12 +6124,12 @@ module.exports = /* } if (s0 === peg$FAILED) { s0 = peg$currPos; - if (input.substr(peg$currPos, 2) === peg$c169) { - s1 = peg$c169; + if (input.substr(peg$currPos, 2) === peg$c168) { + s1 = peg$c168; peg$currPos += 2; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c170); } + if (peg$silentFails === 0) { peg$fail(peg$c169); } } if (s1 !== peg$FAILED) { s2 = peg$parse_(); @@ -6198,11 +6147,11 @@ module.exports = /* if (s0 === peg$FAILED) { s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 124) { - s1 = peg$c171; + s1 = peg$c170; peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c172); } + if (peg$silentFails === 0) { peg$fail(peg$c171); } } if (s1 !== peg$FAILED) { s2 = peg$parse_(); @@ -6220,11 +6169,11 @@ module.exports = /* if (s0 === peg$FAILED) { s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 64) { - s1 = peg$c173; + s1 = peg$c172; peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c174); } + if (peg$silentFails === 0) { peg$fail(peg$c173); } } if (s1 !== peg$FAILED) { s2 = peg$parse_(); @@ -6280,7 +6229,7 @@ module.exports = /* function peg$parsealignat_spec() { var s0, s1, s2, s3, s4; - var key = peg$currPos * 121 + 34, + var key = peg$currPos * 119 + 34, cached = peg$resultsCache[key]; if (cached) { @@ -6294,22 +6243,22 @@ module.exports = /* if (s1 !== peg$FAILED) { s2 = peg$currPos; s3 = []; - if (peg$c167.test(input.charAt(peg$currPos))) { + if (peg$c166.test(input.charAt(peg$currPos))) { s4 = input.charAt(peg$currPos); peg$currPos++; } else { s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c168); } + if (peg$silentFails === 0) { peg$fail(peg$c167); } } if (s4 !== peg$FAILED) { while (s4 !== peg$FAILED) { s3.push(s4); - if (peg$c167.test(input.charAt(peg$currPos))) { + if (peg$c166.test(input.charAt(peg$currPos))) { s4 = input.charAt(peg$currPos); peg$currPos++; } else { s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c168); } + if (peg$silentFails === 0) { peg$fail(peg$c167); } } } } else { @@ -6317,7 +6266,7 @@ module.exports = /* } if (s3 !== peg$FAILED) { peg$savedPos = s2; - s3 = peg$c159(); + s3 = peg$c158(); } s2 = s3; if (s2 !== peg$FAILED) { @@ -6326,7 +6275,7 @@ module.exports = /* s4 = peg$parseCURLY_CLOSE(); if (s4 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c175(s2); + s1 = peg$c174(s2); s0 = s1; } else { peg$currPos = s0; @@ -6353,7 +6302,7 @@ module.exports = /* function peg$parseopt_pos() { var s0, s1, s2, s3, s4, s5, s6; - var key = peg$currPos * 121 + 35, + var key = peg$currPos * 119 + 35, cached = peg$resultsCache[key]; if (cached) { @@ -6373,12 +6322,12 @@ module.exports = /* if (s1 !== peg$FAILED) { s2 = peg$parse_(); if (s2 !== peg$FAILED) { - if (peg$c176.test(input.charAt(peg$currPos))) { + if (peg$c175.test(input.charAt(peg$currPos))) { s3 = input.charAt(peg$currPos); peg$currPos++; } else { s3 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c177); } + if (peg$silentFails === 0) { peg$fail(peg$c176); } } if (s3 !== peg$FAILED) { s4 = peg$parse_(); @@ -6431,7 +6380,7 @@ module.exports = /* function peg$parsealpha() { var s0; - var key = peg$currPos * 121 + 36, + var key = peg$currPos * 119 + 36, cached = peg$resultsCache[key]; if (cached) { @@ -6440,12 +6389,12 @@ module.exports = /* return cached.result; } - if (peg$c178.test(input.charAt(peg$currPos))) { + if (peg$c177.test(input.charAt(peg$currPos))) { s0 = input.charAt(peg$currPos); peg$currPos++; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c179); } + if (peg$silentFails === 0) { peg$fail(peg$c178); } } peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; @@ -6456,7 +6405,7 @@ module.exports = /* function peg$parseliteral_id() { var s0; - var key = peg$currPos * 121 + 37, + var key = peg$currPos * 119 + 37, cached = peg$resultsCache[key]; if (cached) { @@ -6465,12 +6414,12 @@ module.exports = /* return cached.result; } - if (peg$c178.test(input.charAt(peg$currPos))) { + if (peg$c177.test(input.charAt(peg$currPos))) { s0 = input.charAt(peg$currPos); peg$currPos++; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c179); } + if (peg$silentFails === 0) { peg$fail(peg$c178); } } peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; @@ -6481,7 +6430,7 @@ module.exports = /* function peg$parseliteral_mn() { var s0; - var key = peg$currPos * 121 + 38, + var key = peg$currPos * 119 + 38, cached = peg$resultsCache[key]; if (cached) { @@ -6490,12 +6439,12 @@ module.exports = /* return cached.result; } - if (peg$c167.test(input.charAt(peg$currPos))) { + if (peg$c166.test(input.charAt(peg$currPos))) { s0 = input.charAt(peg$currPos); peg$currPos++; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c168); } + if (peg$silentFails === 0) { peg$fail(peg$c167); } } peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; @@ -6506,7 +6455,7 @@ module.exports = /* function peg$parseliteral_uf_lt() { var s0; - var key = peg$currPos * 121 + 39, + var key = peg$currPos * 119 + 39, cached = peg$resultsCache[key]; if (cached) { @@ -6515,12 +6464,12 @@ module.exports = /* return cached.result; } - if (peg$c180.test(input.charAt(peg$currPos))) { + if (peg$c179.test(input.charAt(peg$currPos))) { s0 = input.charAt(peg$currPos); peg$currPos++; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c181); } + if (peg$silentFails === 0) { peg$fail(peg$c180); } } peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; @@ -6531,7 +6480,7 @@ module.exports = /* function peg$parsedelimiter_uf_lt() { var s0; - var key = peg$currPos * 121 + 40, + var key = peg$currPos * 119 + 40, cached = peg$resultsCache[key]; if (cached) { @@ -6540,12 +6489,12 @@ module.exports = /* return cached.result; } - if (peg$c182.test(input.charAt(peg$currPos))) { + if (peg$c181.test(input.charAt(peg$currPos))) { s0 = input.charAt(peg$currPos); peg$currPos++; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c183); } + if (peg$silentFails === 0) { peg$fail(peg$c182); } } peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; @@ -6556,7 +6505,7 @@ module.exports = /* function peg$parseliteral_uf_op() { var s0; - var key = peg$currPos * 121 + 41, + var key = peg$currPos * 119 + 41, cached = peg$resultsCache[key]; if (cached) { @@ -6565,12 +6514,12 @@ module.exports = /* return cached.result; } - if (peg$c184.test(input.charAt(peg$currPos))) { + if (peg$c183.test(input.charAt(peg$currPos))) { s0 = input.charAt(peg$currPos); peg$currPos++; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c185); } + if (peg$silentFails === 0) { peg$fail(peg$c184); } } peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; @@ -6581,7 +6530,7 @@ module.exports = /* function peg$parsedelimiter_uf_op() { var s0; - var key = peg$currPos * 121 + 42, + var key = peg$currPos * 119 + 42, cached = peg$resultsCache[key]; if (cached) { @@ -6590,12 +6539,12 @@ module.exports = /* return cached.result; } - if (peg$c186.test(input.charAt(peg$currPos))) { + if (peg$c185.test(input.charAt(peg$currPos))) { s0 = input.charAt(peg$currPos); peg$currPos++; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c187); } + if (peg$silentFails === 0) { peg$fail(peg$c186); } } peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; @@ -6606,7 +6555,7 @@ module.exports = /* function peg$parsenum() { var s0, s1, s2, s3, s4, s5, s6; - var key = peg$currPos * 121 + 43, + var key = peg$currPos * 119 + 43, cached = peg$resultsCache[key]; if (cached) { @@ -6617,60 +6566,60 @@ module.exports = /* s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 45) { - s1 = peg$c188; + s1 = peg$c187; peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c189); } + if (peg$silentFails === 0) { peg$fail(peg$c188); } } if (s1 === peg$FAILED) { s1 = null; } if (s1 !== peg$FAILED) { s2 = []; - if (peg$c167.test(input.charAt(peg$currPos))) { + if (peg$c166.test(input.charAt(peg$currPos))) { s3 = input.charAt(peg$currPos); peg$currPos++; } else { s3 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c168); } + if (peg$silentFails === 0) { peg$fail(peg$c167); } } while (s3 !== peg$FAILED) { s2.push(s3); - if (peg$c167.test(input.charAt(peg$currPos))) { + if (peg$c166.test(input.charAt(peg$currPos))) { s3 = input.charAt(peg$currPos); peg$currPos++; } else { s3 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c168); } + if (peg$silentFails === 0) { peg$fail(peg$c167); } } } if (s2 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 46) { - s3 = peg$c190; + s3 = peg$c189; peg$currPos++; } else { s3 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c191); } + if (peg$silentFails === 0) { peg$fail(peg$c190); } } if (s3 !== peg$FAILED) { s4 = []; - if (peg$c167.test(input.charAt(peg$currPos))) { + if (peg$c166.test(input.charAt(peg$currPos))) { s5 = input.charAt(peg$currPos); peg$currPos++; } else { s5 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c168); } + if (peg$silentFails === 0) { peg$fail(peg$c167); } } if (s5 !== peg$FAILED) { while (s5 !== peg$FAILED) { s4.push(s5); - if (peg$c167.test(input.charAt(peg$currPos))) { + if (peg$c166.test(input.charAt(peg$currPos))) { s5 = input.charAt(peg$currPos); peg$currPos++; } else { s5 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c168); } + if (peg$silentFails === 0) { peg$fail(peg$c167); } } } } else { @@ -6713,33 +6662,33 @@ module.exports = /* if (s0 === peg$FAILED) { s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 45) { - s1 = peg$c188; + s1 = peg$c187; peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c189); } + if (peg$silentFails === 0) { peg$fail(peg$c188); } } if (s1 === peg$FAILED) { s1 = null; } if (s1 !== peg$FAILED) { s2 = []; - if (peg$c167.test(input.charAt(peg$currPos))) { + if (peg$c166.test(input.charAt(peg$currPos))) { s3 = input.charAt(peg$currPos); peg$currPos++; } else { s3 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c168); } + if (peg$silentFails === 0) { peg$fail(peg$c167); } } if (s3 !== peg$FAILED) { while (s3 !== peg$FAILED) { s2.push(s3); - if (peg$c167.test(input.charAt(peg$currPos))) { + if (peg$c166.test(input.charAt(peg$currPos))) { s3 = input.charAt(peg$currPos); peg$currPos++; } else { s3 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c168); } + if (peg$silentFails === 0) { peg$fail(peg$c167); } } } } else { @@ -6747,11 +6696,11 @@ module.exports = /* } if (s2 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 46) { - s3 = peg$c190; + s3 = peg$c189; peg$currPos++; } else { s3 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c191); } + if (peg$silentFails === 0) { peg$fail(peg$c190); } } if (s3 === peg$FAILED) { s3 = null; @@ -6796,7 +6745,7 @@ module.exports = /* function peg$parsespce() { var s0; - var key = peg$currPos * 121 + 44, + var key = peg$currPos * 119 + 44, cached = peg$resultsCache[key]; if (cached) { @@ -6805,108 +6754,108 @@ module.exports = /* return cached.result; } - if (input.substr(peg$currPos, 2) === peg$c192) { - s0 = peg$c192; + if (input.substr(peg$currPos, 2) === peg$c191) { + s0 = peg$c191; peg$currPos += 2; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c193); } + if (peg$silentFails === 0) { peg$fail(peg$c192); } } if (s0 === peg$FAILED) { - if (input.substr(peg$currPos, 2) === peg$c194) { - s0 = peg$c194; + if (input.substr(peg$currPos, 2) === peg$c193) { + s0 = peg$c193; peg$currPos += 2; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c195); } + if (peg$silentFails === 0) { peg$fail(peg$c194); } } if (s0 === peg$FAILED) { - if (input.substr(peg$currPos, 2) === peg$c196) { - s0 = peg$c196; + if (input.substr(peg$currPos, 2) === peg$c195) { + s0 = peg$c195; peg$currPos += 2; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c197); } + if (peg$silentFails === 0) { peg$fail(peg$c196); } } if (s0 === peg$FAILED) { - if (input.substr(peg$currPos, 2) === peg$c198) { - s0 = peg$c198; + if (input.substr(peg$currPos, 2) === peg$c197) { + s0 = peg$c197; peg$currPos += 2; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c199); } + if (peg$silentFails === 0) { peg$fail(peg$c198); } } if (s0 === peg$FAILED) { - if (input.substr(peg$currPos, 2) === peg$c200) { - s0 = peg$c200; + if (input.substr(peg$currPos, 2) === peg$c199) { + s0 = peg$c199; peg$currPos += 2; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c201); } + if (peg$silentFails === 0) { peg$fail(peg$c200); } } if (s0 === peg$FAILED) { - if (input.substr(peg$currPos, 2) === peg$c202) { - s0 = peg$c202; + if (input.substr(peg$currPos, 2) === peg$c201) { + s0 = peg$c201; peg$currPos += 2; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c203); } + if (peg$silentFails === 0) { peg$fail(peg$c202); } } if (s0 === peg$FAILED) { - if (input.substr(peg$currPos, 2) === peg$c204) { - s0 = peg$c204; + if (input.substr(peg$currPos, 2) === peg$c203) { + s0 = peg$c203; peg$currPos += 2; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c205); } + if (peg$silentFails === 0) { peg$fail(peg$c204); } } if (s0 === peg$FAILED) { - if (input.substr(peg$currPos, 2) === peg$c206) { - s0 = peg$c206; + if (input.substr(peg$currPos, 2) === peg$c205) { + s0 = peg$c205; peg$currPos += 2; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c207); } + if (peg$silentFails === 0) { peg$fail(peg$c206); } } if (s0 === peg$FAILED) { - if (input.substr(peg$currPos, 2) === peg$c208) { - s0 = peg$c208; + if (input.substr(peg$currPos, 2) === peg$c207) { + s0 = peg$c207; peg$currPos += 2; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c209); } + if (peg$silentFails === 0) { peg$fail(peg$c208); } } if (s0 === peg$FAILED) { - if (input.substr(peg$currPos, 2) === peg$c210) { - s0 = peg$c210; + if (input.substr(peg$currPos, 2) === peg$c209) { + s0 = peg$c209; peg$currPos += 2; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c211); } + if (peg$silentFails === 0) { peg$fail(peg$c210); } } if (s0 === peg$FAILED) { - if (input.substr(peg$currPos, 2) === peg$c212) { - s0 = peg$c212; + if (input.substr(peg$currPos, 2) === peg$c211) { + s0 = peg$c211; peg$currPos += 2; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c213); } + if (peg$silentFails === 0) { peg$fail(peg$c212); } } if (s0 === peg$FAILED) { - if (input.substr(peg$currPos, 2) === peg$c214) { - s0 = peg$c214; + if (input.substr(peg$currPos, 2) === peg$c213) { + s0 = peg$c213; peg$currPos += 2; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c215); } + if (peg$silentFails === 0) { peg$fail(peg$c214); } } if (s0 === peg$FAILED) { - if (input.substr(peg$currPos, 2) === peg$c216) { - s0 = peg$c216; + if (input.substr(peg$currPos, 2) === peg$c215) { + s0 = peg$c215; peg$currPos += 2; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c217); } + if (peg$silentFails === 0) { peg$fail(peg$c216); } } } } @@ -6929,7 +6878,7 @@ module.exports = /* function peg$parseatsymbol() { var s0; - var key = peg$currPos * 121 + 45, + var key = peg$currPos * 119 + 45, cached = peg$resultsCache[key]; if (cached) { @@ -6938,12 +6887,12 @@ module.exports = /* return cached.result; } - if (peg$c218.test(input.charAt(peg$currPos))) { + if (peg$c217.test(input.charAt(peg$currPos))) { s0 = input.charAt(peg$currPos); peg$currPos++; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c219); } + if (peg$silentFails === 0) { peg$fail(peg$c218); } } peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; @@ -6954,7 +6903,7 @@ module.exports = /* function peg$parseboxchars() { var s0, s1, s2; - var key = peg$currPos * 121 + 46, + var key = peg$currPos * 119 + 46, cached = peg$resultsCache[key]; if (cached) { @@ -6963,33 +6912,33 @@ module.exports = /* return cached.result; } - if (peg$c220.test(input.charAt(peg$currPos))) { + if (peg$c219.test(input.charAt(peg$currPos))) { s0 = input.charAt(peg$currPos); peg$currPos++; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c221); } + if (peg$silentFails === 0) { peg$fail(peg$c220); } } if (s0 === peg$FAILED) { s0 = peg$currPos; - if (peg$c222.test(input.charAt(peg$currPos))) { + if (peg$c221.test(input.charAt(peg$currPos))) { s1 = input.charAt(peg$currPos); peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c223); } + if (peg$silentFails === 0) { peg$fail(peg$c222); } } if (s1 !== peg$FAILED) { - if (peg$c224.test(input.charAt(peg$currPos))) { + if (peg$c223.test(input.charAt(peg$currPos))) { s2 = input.charAt(peg$currPos); peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c225); } + if (peg$silentFails === 0) { peg$fail(peg$c224); } } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c226(s1, s2); + s1 = peg$c225(s1, s2); s0 = s1; } else { peg$currPos = s0; @@ -7009,7 +6958,7 @@ module.exports = /* function peg$parseBOX() { var s0, s1, s2, s3, s4, s5, s6, s7; - var key = peg$currPos * 121 + 47, + var key = peg$currPos * 119 + 47, cached = peg$resultsCache[key]; if (cached) { @@ -7022,7 +6971,7 @@ module.exports = /* s1 = peg$parsegeneric_func(); if (s1 !== peg$FAILED) { peg$savedPos = peg$currPos; - s2 = peg$c227(s1); + s2 = peg$c226(s1); if (s2) { s2 = void 0; } else { @@ -7061,7 +7010,7 @@ module.exports = /* s7 = peg$parse_(); if (s7 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c228(s1, s5); + s1 = peg$c227(s1, s5); s0 = s1; } else { peg$currPos = s0; @@ -7100,7 +7049,7 @@ module.exports = /* function peg$parseLITERAL() { var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9; - var key = peg$currPos * 121 + 48, + var key = peg$currPos * 119 + 48, cached = peg$resultsCache[key]; if (cached) { @@ -7117,11 +7066,11 @@ module.exports = /* s1 = peg$parseliteral_uf_lt(); if (s1 === peg$FAILED) { if (input.charCodeAt(peg$currPos) === 45) { - s1 = peg$c188; + s1 = peg$c187; peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c189); } + if (peg$silentFails === 0) { peg$fail(peg$c188); } } if (s1 === peg$FAILED) { s1 = peg$parseliteral_uf_op(); @@ -7133,7 +7082,7 @@ module.exports = /* s2 = peg$parse_(); if (s2 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c229(s1); + s1 = peg$c228(s1); s0 = s1; } else { peg$currPos = s0; @@ -7148,7 +7097,7 @@ module.exports = /* s1 = peg$parsegeneric_func(); if (s1 !== peg$FAILED) { peg$savedPos = peg$currPos; - s2 = peg$c230(s1); + s2 = peg$c229(s1); if (s2) { s2 = void 0; } else { @@ -7158,11 +7107,11 @@ module.exports = /* s3 = peg$parse_(); if (s3 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 40) { - s4 = peg$c231; + s4 = peg$c230; peg$currPos++; } else { s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c232); } + if (peg$silentFails === 0) { peg$fail(peg$c231); } } if (s4 === peg$FAILED) { if (input.charCodeAt(peg$currPos) === 91) { @@ -7173,19 +7122,19 @@ module.exports = /* if (peg$silentFails === 0) { peg$fail(peg$c112); } } if (s4 === peg$FAILED) { - if (input.substr(peg$currPos, 2) === peg$c233) { - s4 = peg$c233; + if (input.substr(peg$currPos, 2) === peg$c232) { + s4 = peg$c232; peg$currPos += 2; } else { s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c234); } + if (peg$silentFails === 0) { peg$fail(peg$c233); } } if (s4 === peg$FAILED) { s4 = peg$currPos; s5 = peg$c50; if (s5 !== peg$FAILED) { peg$savedPos = s4; - s5 = peg$c235(s1); + s5 = peg$c234(s1); } s4 = s5; } @@ -7195,7 +7144,7 @@ module.exports = /* s5 = peg$parse_(); if (s5 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c236(s1, s4); + s1 = peg$c235(s1, s4); s0 = s1; } else { peg$currPos = s0; @@ -7222,7 +7171,7 @@ module.exports = /* s1 = peg$parsegeneric_func(); if (s1 !== peg$FAILED) { peg$savedPos = peg$currPos; - s2 = peg$c237(s1); + s2 = peg$c236(s1); if (s2) { s2 = void 0; } else { @@ -7232,11 +7181,11 @@ module.exports = /* s3 = peg$parse_(); if (s3 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 40) { - s4 = peg$c231; + s4 = peg$c230; peg$currPos++; } else { s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c232); } + if (peg$silentFails === 0) { peg$fail(peg$c231); } } if (s4 === peg$FAILED) { if (input.charCodeAt(peg$currPos) === 91) { @@ -7247,19 +7196,19 @@ module.exports = /* if (peg$silentFails === 0) { peg$fail(peg$c112); } } if (s4 === peg$FAILED) { - if (input.substr(peg$currPos, 2) === peg$c233) { - s4 = peg$c233; + if (input.substr(peg$currPos, 2) === peg$c232) { + s4 = peg$c232; peg$currPos += 2; } else { s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c234); } + if (peg$silentFails === 0) { peg$fail(peg$c233); } } if (s4 === peg$FAILED) { s4 = peg$currPos; s5 = peg$c50; if (s5 !== peg$FAILED) { peg$savedPos = s4; - s5 = peg$c238(s1); + s5 = peg$c237(s1); } s4 = s5; } @@ -7269,7 +7218,7 @@ module.exports = /* s5 = peg$parse_(); if (s5 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c239(s1, s4); + s1 = peg$c238(s1, s4); s0 = s1; } else { peg$currPos = s0; @@ -7296,7 +7245,7 @@ module.exports = /* s1 = peg$parsegeneric_func(); if (s1 !== peg$FAILED) { peg$savedPos = peg$currPos; - s2 = peg$c240(s1); + s2 = peg$c239(s1); if (s2) { s2 = void 0; } else { @@ -7306,7 +7255,7 @@ module.exports = /* s3 = peg$parse_(); if (s3 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c241(s1); + s1 = peg$c240(s1); s0 = s1; } else { peg$currPos = s0; @@ -7325,7 +7274,7 @@ module.exports = /* s1 = peg$parsegeneric_func(); if (s1 !== peg$FAILED) { peg$savedPos = peg$currPos; - s2 = peg$c242(s1); + s2 = peg$c241(s1); if (s2) { s2 = void 0; } else { @@ -7335,7 +7284,7 @@ module.exports = /* s3 = peg$parse_(); if (s3 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c243(s1); + s1 = peg$c242(s1); s0 = s1; } else { peg$currPos = s0; @@ -7354,7 +7303,7 @@ module.exports = /* s1 = peg$parsegeneric_func(); if (s1 !== peg$FAILED) { peg$savedPos = peg$currPos; - s2 = peg$c244(s1); + s2 = peg$c243(s1); if (s2) { s2 = void 0; } else { @@ -7374,7 +7323,7 @@ module.exports = /* s5 = peg$parsegeneric_func(); if (s5 !== peg$FAILED) { peg$savedPos = peg$currPos; - s6 = peg$c245(s1, s5); + s6 = peg$c244(s1, s5); if (s6) { s6 = void 0; } else { @@ -7394,7 +7343,7 @@ module.exports = /* s9 = peg$parse_(); if (s9 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c246(s1, s5); + s1 = peg$c245(s1, s5); s0 = s1; } else { peg$currPos = s0; @@ -7437,7 +7386,7 @@ module.exports = /* s1 = peg$parsegeneric_func(); if (s1 !== peg$FAILED) { peg$savedPos = peg$currPos; - s2 = peg$c247(s1); + s2 = peg$c246(s1); if (s2) { s2 = void 0; } else { @@ -7447,7 +7396,7 @@ module.exports = /* s3 = peg$parse_(); if (s3 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c248(s1); + s1 = peg$c247(s1); s0 = s1; } else { peg$currPos = s0; @@ -7466,7 +7415,7 @@ module.exports = /* s1 = peg$parsegeneric_func(); if (s1 !== peg$FAILED) { peg$savedPos = peg$currPos; - s2 = peg$c249(s1); + s2 = peg$c248(s1); if (s2) { s2 = void 0; } else { @@ -7486,7 +7435,7 @@ module.exports = /* s5 = peg$parsegeneric_func(); if (s5 !== peg$FAILED) { peg$savedPos = peg$currPos; - s6 = peg$c250(s1, s5); + s6 = peg$c249(s1, s5); if (s6) { s6 = void 0; } else { @@ -7506,7 +7455,7 @@ module.exports = /* s9 = peg$parse_(); if (s9 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c251(s1, s5); + s1 = peg$c250(s1, s5); s0 = s1; } else { peg$currPos = s0; @@ -7552,31 +7501,31 @@ module.exports = /* } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c252(s1); + s1 = peg$c251(s1); } s0 = s1; if (s0 === peg$FAILED) { s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 92) { - s1 = peg$c253; + s1 = peg$c252; peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c254); } + if (peg$silentFails === 0) { peg$fail(peg$c253); } } if (s1 !== peg$FAILED) { - if (peg$c255.test(input.charAt(peg$currPos))) { + if (peg$c254.test(input.charAt(peg$currPos))) { s2 = input.charAt(peg$currPos); peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c256); } + if (peg$silentFails === 0) { peg$fail(peg$c255); } } if (s2 !== peg$FAILED) { s3 = peg$parse_(); if (s3 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c257(s2); + s1 = peg$c256(s2); s0 = s1; } else { peg$currPos = s0; @@ -7592,18 +7541,18 @@ module.exports = /* } if (s0 === peg$FAILED) { s0 = peg$currPos; - if (peg$c258.test(input.charAt(peg$currPos))) { + if (peg$c257.test(input.charAt(peg$currPos))) { s1 = input.charAt(peg$currPos); peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c259); } + if (peg$silentFails === 0) { peg$fail(peg$c258); } } if (s1 !== peg$FAILED) { s2 = peg$parse_(); if (s2 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c229(s1); + s1 = peg$c228(s1); s0 = s1; } else { peg$currPos = s0; @@ -7615,18 +7564,18 @@ module.exports = /* } if (s0 === peg$FAILED) { s0 = peg$currPos; - if (peg$c260.test(input.charAt(peg$currPos))) { + if (peg$c259.test(input.charAt(peg$currPos))) { s1 = input.charAt(peg$currPos); peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c261); } + if (peg$silentFails === 0) { peg$fail(peg$c260); } } if (s1 !== peg$FAILED) { s2 = peg$parse_(); if (s2 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c262(s1); + s1 = peg$c261(s1); s0 = s1; } else { peg$currPos = s0; @@ -7656,7 +7605,7 @@ module.exports = /* function peg$parseLITERALPART() { var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9; - var key = peg$currPos * 121 + 49, + var key = peg$currPos * 119 + 49, cached = peg$resultsCache[key]; if (cached) { @@ -7669,7 +7618,7 @@ module.exports = /* s1 = peg$parsegeneric_func(); if (s1 !== peg$FAILED) { peg$savedPos = peg$currPos; - s2 = peg$c230(s1); + s2 = peg$c229(s1); if (s2) { s2 = void 0; } else { @@ -7679,11 +7628,11 @@ module.exports = /* s3 = peg$parse_(); if (s3 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 40) { - s4 = peg$c231; + s4 = peg$c230; peg$currPos++; } else { s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c232); } + if (peg$silentFails === 0) { peg$fail(peg$c231); } } if (s4 === peg$FAILED) { if (input.charCodeAt(peg$currPos) === 91) { @@ -7694,19 +7643,19 @@ module.exports = /* if (peg$silentFails === 0) { peg$fail(peg$c112); } } if (s4 === peg$FAILED) { - if (input.substr(peg$currPos, 2) === peg$c233) { - s4 = peg$c233; + if (input.substr(peg$currPos, 2) === peg$c232) { + s4 = peg$c232; peg$currPos += 2; } else { s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c234); } + if (peg$silentFails === 0) { peg$fail(peg$c233); } } if (s4 === peg$FAILED) { s4 = peg$currPos; s5 = peg$c50; if (s5 !== peg$FAILED) { peg$savedPos = s4; - s5 = peg$c235(s1); + s5 = peg$c234(s1); } s4 = s5; } @@ -7716,7 +7665,7 @@ module.exports = /* s5 = peg$parse_(); if (s5 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c236(s1, s4); + s1 = peg$c235(s1, s4); s0 = s1; } else { peg$currPos = s0; @@ -7743,7 +7692,7 @@ module.exports = /* s1 = peg$parsegeneric_func(); if (s1 !== peg$FAILED) { peg$savedPos = peg$currPos; - s2 = peg$c237(s1); + s2 = peg$c236(s1); if (s2) { s2 = void 0; } else { @@ -7753,11 +7702,11 @@ module.exports = /* s3 = peg$parse_(); if (s3 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 40) { - s4 = peg$c231; + s4 = peg$c230; peg$currPos++; } else { s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c232); } + if (peg$silentFails === 0) { peg$fail(peg$c231); } } if (s4 === peg$FAILED) { if (input.charCodeAt(peg$currPos) === 91) { @@ -7768,19 +7717,19 @@ module.exports = /* if (peg$silentFails === 0) { peg$fail(peg$c112); } } if (s4 === peg$FAILED) { - if (input.substr(peg$currPos, 2) === peg$c233) { - s4 = peg$c233; + if (input.substr(peg$currPos, 2) === peg$c232) { + s4 = peg$c232; peg$currPos += 2; } else { s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c234); } + if (peg$silentFails === 0) { peg$fail(peg$c233); } } if (s4 === peg$FAILED) { s4 = peg$currPos; s5 = peg$c50; if (s5 !== peg$FAILED) { peg$savedPos = s4; - s5 = peg$c238(s1); + s5 = peg$c237(s1); } s4 = s5; } @@ -7790,7 +7739,7 @@ module.exports = /* s5 = peg$parse_(); if (s5 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c239(s1, s4); + s1 = peg$c238(s1, s4); s0 = s1; } else { peg$currPos = s0; @@ -7817,7 +7766,7 @@ module.exports = /* s1 = peg$parsegeneric_func(); if (s1 !== peg$FAILED) { peg$savedPos = peg$currPos; - s2 = peg$c240(s1); + s2 = peg$c239(s1); if (s2) { s2 = void 0; } else { @@ -7827,7 +7776,7 @@ module.exports = /* s3 = peg$parse_(); if (s3 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c241(s1); + s1 = peg$c240(s1); s0 = s1; } else { peg$currPos = s0; @@ -7846,7 +7795,7 @@ module.exports = /* s1 = peg$parsegeneric_func(); if (s1 !== peg$FAILED) { peg$savedPos = peg$currPos; - s2 = peg$c247(s1); + s2 = peg$c246(s1); if (s2) { s2 = void 0; } else { @@ -7856,7 +7805,7 @@ module.exports = /* s3 = peg$parse_(); if (s3 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c248(s1); + s1 = peg$c247(s1); s0 = s1; } else { peg$currPos = s0; @@ -7875,7 +7824,7 @@ module.exports = /* s1 = peg$parsegeneric_func(); if (s1 !== peg$FAILED) { peg$savedPos = peg$currPos; - s2 = peg$c249(s1); + s2 = peg$c248(s1); if (s2) { s2 = void 0; } else { @@ -7895,7 +7844,7 @@ module.exports = /* s5 = peg$parsegeneric_func(); if (s5 !== peg$FAILED) { peg$savedPos = peg$currPos; - s6 = peg$c250(s1, s5); + s6 = peg$c249(s1, s5); if (s6) { s6 = void 0; } else { @@ -7915,7 +7864,7 @@ module.exports = /* s9 = peg$parse_(); if (s9 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c251(s1, s5); + s1 = peg$c250(s1, s5); s0 = s1; } else { peg$currPos = s0; @@ -7968,7 +7917,7 @@ module.exports = /* s3 = peg$parse_(); if (s3 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c263(s1); + s1 = peg$c262(s1); s0 = s1; } else { peg$currPos = s0; @@ -7990,31 +7939,31 @@ module.exports = /* } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c252(s1); + s1 = peg$c251(s1); } s0 = s1; if (s0 === peg$FAILED) { s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 92) { - s1 = peg$c253; + s1 = peg$c252; peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c254); } + if (peg$silentFails === 0) { peg$fail(peg$c253); } } if (s1 !== peg$FAILED) { - if (peg$c255.test(input.charAt(peg$currPos))) { + if (peg$c254.test(input.charAt(peg$currPos))) { s2 = input.charAt(peg$currPos); peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c256); } + if (peg$silentFails === 0) { peg$fail(peg$c255); } } if (s2 !== peg$FAILED) { s3 = peg$parse_(); if (s3 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c257(s2); + s1 = peg$c256(s2); s0 = s1; } else { peg$currPos = s0; @@ -8030,18 +7979,18 @@ module.exports = /* } if (s0 === peg$FAILED) { s0 = peg$currPos; - if (peg$c258.test(input.charAt(peg$currPos))) { + if (peg$c257.test(input.charAt(peg$currPos))) { s1 = input.charAt(peg$currPos); peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c259); } + if (peg$silentFails === 0) { peg$fail(peg$c258); } } if (s1 !== peg$FAILED) { s2 = peg$parse_(); if (s2 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c229(s1); + s1 = peg$c228(s1); s0 = s1; } else { peg$currPos = s0; @@ -8053,18 +8002,18 @@ module.exports = /* } if (s0 === peg$FAILED) { s0 = peg$currPos; - if (peg$c260.test(input.charAt(peg$currPos))) { + if (peg$c259.test(input.charAt(peg$currPos))) { s1 = input.charAt(peg$currPos); peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c261); } + if (peg$silentFails === 0) { peg$fail(peg$c260); } } if (s1 !== peg$FAILED) { s2 = peg$parse_(); if (s2 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c262(s1); + s1 = peg$c261(s1); s0 = s1; } else { peg$currPos = s0; @@ -8092,7 +8041,7 @@ module.exports = /* function peg$parseDELIMITER() { var s0, s1, s2, s3; - var key = peg$currPos * 121 + 50, + var key = peg$currPos * 119 + 50, cached = peg$resultsCache[key]; if (cached) { @@ -8119,7 +8068,7 @@ module.exports = /* s2 = peg$parse_(); if (s2 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c229(s1); + s1 = peg$c228(s1); s0 = s1; } else { peg$currPos = s0; @@ -8132,25 +8081,25 @@ module.exports = /* if (s0 === peg$FAILED) { s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 92) { - s1 = peg$c253; + s1 = peg$c252; peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c254); } + if (peg$silentFails === 0) { peg$fail(peg$c253); } } if (s1 !== peg$FAILED) { - if (peg$c264.test(input.charAt(peg$currPos))) { + if (peg$c263.test(input.charAt(peg$currPos))) { s2 = input.charAt(peg$currPos); peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c265); } + if (peg$silentFails === 0) { peg$fail(peg$c264); } } if (s2 !== peg$FAILED) { s3 = peg$parse_(); if (s3 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c257(s2); + s1 = peg$c256(s2); s0 = s1; } else { peg$currPos = s0; @@ -8169,7 +8118,7 @@ module.exports = /* s1 = peg$parsegeneric_func(); if (s1 !== peg$FAILED) { peg$savedPos = peg$currPos; - s2 = peg$c266(s1); + s2 = peg$c265(s1); if (s2) { s2 = void 0; } else { @@ -8179,7 +8128,7 @@ module.exports = /* s3 = peg$parse_(); if (s3 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c241(s1); + s1 = peg$c240(s1); s0 = s1; } else { peg$currPos = s0; @@ -8198,7 +8147,7 @@ module.exports = /* s1 = peg$parsegeneric_func(); if (s1 !== peg$FAILED) { peg$savedPos = peg$currPos; - s2 = peg$c267(s1); + s2 = peg$c266(s1); if (s2) { s2 = void 0; } else { @@ -8208,7 +8157,7 @@ module.exports = /* s3 = peg$parse_(); if (s3 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c268(s1); + s1 = peg$c267(s1); s0 = s1; } else { peg$currPos = s0; @@ -8229,7 +8178,7 @@ module.exports = /* s2 = peg$parse_(); if (s2 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c269(s1); + s1 = peg$c268(s1); s0 = s1; } else { peg$currPos = s0; @@ -8252,7 +8201,7 @@ module.exports = /* function peg$parseFUN_AR1nb() { var s0, s1, s2, s3, s4; - var key = peg$currPos * 121 + 51, + var key = peg$currPos * 119 + 51, cached = peg$resultsCache[key]; if (cached) { @@ -8265,7 +8214,7 @@ module.exports = /* s1 = peg$parsegeneric_func(); if (s1 !== peg$FAILED) { peg$savedPos = peg$currPos; - s2 = peg$c270(s1); + s2 = peg$c269(s1); if (s2) { s2 = void 0; } else { @@ -8280,7 +8229,7 @@ module.exports = /* } if (s3 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c271(s1); + s1 = peg$c270(s1); s0 = s1; } else { peg$currPos = s0; @@ -8303,7 +8252,7 @@ module.exports = /* function peg$parseFUN_AR1opt() { var s0, s1, s2, s3, s4, s5, s6; - var key = peg$currPos * 121 + 52, + var key = peg$currPos * 119 + 52, cached = peg$resultsCache[key]; if (cached) { @@ -8316,7 +8265,7 @@ module.exports = /* s1 = peg$parsegeneric_func(); if (s1 !== peg$FAILED) { peg$savedPos = peg$currPos; - s2 = peg$c272(s1); + s2 = peg$c271(s1); if (s2) { s2 = void 0; } else { @@ -8346,7 +8295,7 @@ module.exports = /* } if (s5 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c271(s1); + s1 = peg$c270(s1); s0 = s1; } else { peg$currPos = s0; @@ -8377,7 +8326,7 @@ module.exports = /* function peg$parseNEXT_CELL() { var s0, s1, s2; - var key = peg$currPos * 121 + 53, + var key = peg$currPos * 119 + 53, cached = peg$resultsCache[key]; if (cached) { @@ -8388,11 +8337,11 @@ module.exports = /* s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 38) { - s1 = peg$c273; + s1 = peg$c272; peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c274); } + if (peg$silentFails === 0) { peg$fail(peg$c273); } } if (s1 !== peg$FAILED) { s2 = peg$parse_(); @@ -8416,7 +8365,7 @@ module.exports = /* function peg$parseNEXT_ROW() { var s0, s1, s2; - var key = peg$currPos * 121 + 54, + var key = peg$currPos * 119 + 54, cached = peg$resultsCache[key]; if (cached) { @@ -8426,12 +8375,12 @@ module.exports = /* } s0 = peg$currPos; - if (input.substr(peg$currPos, 2) === peg$c275) { - s1 = peg$c275; + if (input.substr(peg$currPos, 2) === peg$c274) { + s1 = peg$c274; peg$currPos += 2; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c276); } + if (peg$silentFails === 0) { peg$fail(peg$c275); } } if (s1 !== peg$FAILED) { s2 = peg$parse_(); @@ -8455,7 +8404,7 @@ module.exports = /* function peg$parseBEGIN() { var s0, s1, s2; - var key = peg$currPos * 121 + 55, + var key = peg$currPos * 119 + 55, cached = peg$resultsCache[key]; if (cached) { @@ -8465,12 +8414,12 @@ module.exports = /* } s0 = peg$currPos; - if (input.substr(peg$currPos, 6) === peg$c277) { - s1 = peg$c277; + if (input.substr(peg$currPos, 6) === peg$c276) { + s1 = peg$c276; peg$currPos += 6; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c278); } + if (peg$silentFails === 0) { peg$fail(peg$c277); } } if (s1 !== peg$FAILED) { s2 = peg$parse_(); @@ -8494,7 +8443,7 @@ module.exports = /* function peg$parseEND() { var s0, s1, s2; - var key = peg$currPos * 121 + 56, + var key = peg$currPos * 119 + 56, cached = peg$resultsCache[key]; if (cached) { @@ -8504,12 +8453,12 @@ module.exports = /* } s0 = peg$currPos; - if (input.substr(peg$currPos, 4) === peg$c279) { - s1 = peg$c279; + if (input.substr(peg$currPos, 4) === peg$c278) { + s1 = peg$c278; peg$currPos += 4; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c280); } + if (peg$silentFails === 0) { peg$fail(peg$c279); } } if (s1 !== peg$FAILED) { s2 = peg$parse_(); @@ -8533,7 +8482,7 @@ module.exports = /* function peg$parseBEGIN_MATRIX() { var s0, s1, s2, s3; - var key = peg$currPos * 121 + 57, + var key = peg$currPos * 119 + 57, cached = peg$resultsCache[key]; if (cached) { @@ -8545,12 +8494,12 @@ module.exports = /* s0 = peg$currPos; s1 = peg$parseBEGIN(); if (s1 !== peg$FAILED) { - if (input.substr(peg$currPos, 8) === peg$c281) { - s2 = peg$c281; + if (input.substr(peg$currPos, 8) === peg$c280) { + s2 = peg$c280; peg$currPos += 8; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c282); } + if (peg$silentFails === 0) { peg$fail(peg$c281); } } if (s2 !== peg$FAILED) { s3 = peg$parse_(); @@ -8578,7 +8527,7 @@ module.exports = /* function peg$parseEND_MATRIX() { var s0, s1, s2, s3; - var key = peg$currPos * 121 + 58, + var key = peg$currPos * 119 + 58, cached = peg$resultsCache[key]; if (cached) { @@ -8590,12 +8539,12 @@ module.exports = /* s0 = peg$currPos; s1 = peg$parseEND(); if (s1 !== peg$FAILED) { - if (input.substr(peg$currPos, 8) === peg$c281) { - s2 = peg$c281; + if (input.substr(peg$currPos, 8) === peg$c280) { + s2 = peg$c280; peg$currPos += 8; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c282); } + if (peg$silentFails === 0) { peg$fail(peg$c281); } } if (s2 !== peg$FAILED) { s3 = peg$parse_(); @@ -8623,7 +8572,7 @@ module.exports = /* function peg$parseBEGIN_PMATRIX() { var s0, s1, s2, s3; - var key = peg$currPos * 121 + 59, + var key = peg$currPos * 119 + 59, cached = peg$resultsCache[key]; if (cached) { @@ -8635,12 +8584,12 @@ module.exports = /* s0 = peg$currPos; s1 = peg$parseBEGIN(); if (s1 !== peg$FAILED) { - if (input.substr(peg$currPos, 9) === peg$c283) { - s2 = peg$c283; + if (input.substr(peg$currPos, 9) === peg$c282) { + s2 = peg$c282; peg$currPos += 9; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c284); } + if (peg$silentFails === 0) { peg$fail(peg$c283); } } if (s2 !== peg$FAILED) { s3 = peg$parse_(); @@ -8668,7 +8617,7 @@ module.exports = /* function peg$parseEND_PMATRIX() { var s0, s1, s2, s3; - var key = peg$currPos * 121 + 60, + var key = peg$currPos * 119 + 60, cached = peg$resultsCache[key]; if (cached) { @@ -8680,12 +8629,12 @@ module.exports = /* s0 = peg$currPos; s1 = peg$parseEND(); if (s1 !== peg$FAILED) { - if (input.substr(peg$currPos, 9) === peg$c283) { - s2 = peg$c283; + if (input.substr(peg$currPos, 9) === peg$c282) { + s2 = peg$c282; peg$currPos += 9; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c284); } + if (peg$silentFails === 0) { peg$fail(peg$c283); } } if (s2 !== peg$FAILED) { s3 = peg$parse_(); @@ -8713,7 +8662,7 @@ module.exports = /* function peg$parseBEGIN_BMATRIX() { var s0, s1, s2, s3; - var key = peg$currPos * 121 + 61, + var key = peg$currPos * 119 + 61, cached = peg$resultsCache[key]; if (cached) { @@ -8725,12 +8674,12 @@ module.exports = /* s0 = peg$currPos; s1 = peg$parseBEGIN(); if (s1 !== peg$FAILED) { - if (input.substr(peg$currPos, 9) === peg$c285) { - s2 = peg$c285; + if (input.substr(peg$currPos, 9) === peg$c284) { + s2 = peg$c284; peg$currPos += 9; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c286); } + if (peg$silentFails === 0) { peg$fail(peg$c285); } } if (s2 !== peg$FAILED) { s3 = peg$parse_(); @@ -8758,7 +8707,7 @@ module.exports = /* function peg$parseEND_BMATRIX() { var s0, s1, s2, s3; - var key = peg$currPos * 121 + 62, + var key = peg$currPos * 119 + 62, cached = peg$resultsCache[key]; if (cached) { @@ -8770,12 +8719,12 @@ module.exports = /* s0 = peg$currPos; s1 = peg$parseEND(); if (s1 !== peg$FAILED) { - if (input.substr(peg$currPos, 9) === peg$c285) { - s2 = peg$c285; + if (input.substr(peg$currPos, 9) === peg$c284) { + s2 = peg$c284; peg$currPos += 9; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c286); } + if (peg$silentFails === 0) { peg$fail(peg$c285); } } if (s2 !== peg$FAILED) { s3 = peg$parse_(); @@ -8803,7 +8752,7 @@ module.exports = /* function peg$parseBEGIN_BBMATRIX() { var s0, s1, s2, s3; - var key = peg$currPos * 121 + 63, + var key = peg$currPos * 119 + 63, cached = peg$resultsCache[key]; if (cached) { @@ -8815,12 +8764,12 @@ module.exports = /* s0 = peg$currPos; s1 = peg$parseBEGIN(); if (s1 !== peg$FAILED) { - if (input.substr(peg$currPos, 9) === peg$c287) { - s2 = peg$c287; + if (input.substr(peg$currPos, 9) === peg$c286) { + s2 = peg$c286; peg$currPos += 9; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c288); } + if (peg$silentFails === 0) { peg$fail(peg$c287); } } if (s2 !== peg$FAILED) { s3 = peg$parse_(); @@ -8848,7 +8797,7 @@ module.exports = /* function peg$parseEND_BBMATRIX() { var s0, s1, s2, s3; - var key = peg$currPos * 121 + 64, + var key = peg$currPos * 119 + 64, cached = peg$resultsCache[key]; if (cached) { @@ -8860,12 +8809,12 @@ module.exports = /* s0 = peg$currPos; s1 = peg$parseEND(); if (s1 !== peg$FAILED) { - if (input.substr(peg$currPos, 9) === peg$c287) { - s2 = peg$c287; + if (input.substr(peg$currPos, 9) === peg$c286) { + s2 = peg$c286; peg$currPos += 9; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c288); } + if (peg$silentFails === 0) { peg$fail(peg$c287); } } if (s2 !== peg$FAILED) { s3 = peg$parse_(); @@ -8893,7 +8842,7 @@ module.exports = /* function peg$parseBEGIN_VMATRIX() { var s0, s1, s2, s3; - var key = peg$currPos * 121 + 65, + var key = peg$currPos * 119 + 65, cached = peg$resultsCache[key]; if (cached) { @@ -8905,12 +8854,12 @@ module.exports = /* s0 = peg$currPos; s1 = peg$parseBEGIN(); if (s1 !== peg$FAILED) { - if (input.substr(peg$currPos, 9) === peg$c289) { - s2 = peg$c289; + if (input.substr(peg$currPos, 9) === peg$c288) { + s2 = peg$c288; peg$currPos += 9; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c290); } + if (peg$silentFails === 0) { peg$fail(peg$c289); } } if (s2 !== peg$FAILED) { s3 = peg$parse_(); @@ -8938,7 +8887,7 @@ module.exports = /* function peg$parseEND_VMATRIX() { var s0, s1, s2, s3; - var key = peg$currPos * 121 + 66, + var key = peg$currPos * 119 + 66, cached = peg$resultsCache[key]; if (cached) { @@ -8950,12 +8899,12 @@ module.exports = /* s0 = peg$currPos; s1 = peg$parseEND(); if (s1 !== peg$FAILED) { - if (input.substr(peg$currPos, 9) === peg$c289) { - s2 = peg$c289; + if (input.substr(peg$currPos, 9) === peg$c288) { + s2 = peg$c288; peg$currPos += 9; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c290); } + if (peg$silentFails === 0) { peg$fail(peg$c289); } } if (s2 !== peg$FAILED) { s3 = peg$parse_(); @@ -8983,7 +8932,7 @@ module.exports = /* function peg$parseBEGIN_VVMATRIX() { var s0, s1, s2, s3; - var key = peg$currPos * 121 + 67, + var key = peg$currPos * 119 + 67, cached = peg$resultsCache[key]; if (cached) { @@ -8995,12 +8944,12 @@ module.exports = /* s0 = peg$currPos; s1 = peg$parseBEGIN(); if (s1 !== peg$FAILED) { - if (input.substr(peg$currPos, 9) === peg$c291) { - s2 = peg$c291; + if (input.substr(peg$currPos, 9) === peg$c290) { + s2 = peg$c290; peg$currPos += 9; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c292); } + if (peg$silentFails === 0) { peg$fail(peg$c291); } } if (s2 !== peg$FAILED) { s3 = peg$parse_(); @@ -9028,7 +8977,7 @@ module.exports = /* function peg$parseEND_VVMATRIX() { var s0, s1, s2, s3; - var key = peg$currPos * 121 + 68, + var key = peg$currPos * 119 + 68, cached = peg$resultsCache[key]; if (cached) { @@ -9040,12 +8989,12 @@ module.exports = /* s0 = peg$currPos; s1 = peg$parseEND(); if (s1 !== peg$FAILED) { - if (input.substr(peg$currPos, 9) === peg$c291) { - s2 = peg$c291; + if (input.substr(peg$currPos, 9) === peg$c290) { + s2 = peg$c290; peg$currPos += 9; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c292); } + if (peg$silentFails === 0) { peg$fail(peg$c291); } } if (s2 !== peg$FAILED) { s3 = peg$parse_(); @@ -9073,7 +9022,7 @@ module.exports = /* function peg$parseBEGIN_ARRAY() { var s0, s1, s2, s3; - var key = peg$currPos * 121 + 69, + var key = peg$currPos * 119 + 69, cached = peg$resultsCache[key]; if (cached) { @@ -9085,12 +9034,12 @@ module.exports = /* s0 = peg$currPos; s1 = peg$parseBEGIN(); if (s1 !== peg$FAILED) { - if (input.substr(peg$currPos, 7) === peg$c293) { - s2 = peg$c293; + if (input.substr(peg$currPos, 7) === peg$c292) { + s2 = peg$c292; peg$currPos += 7; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c294); } + if (peg$silentFails === 0) { peg$fail(peg$c293); } } if (s2 !== peg$FAILED) { s3 = peg$parse_(); @@ -9118,7 +9067,7 @@ module.exports = /* function peg$parseEND_ARRAY() { var s0, s1, s2, s3; - var key = peg$currPos * 121 + 70, + var key = peg$currPos * 119 + 70, cached = peg$resultsCache[key]; if (cached) { @@ -9130,12 +9079,12 @@ module.exports = /* s0 = peg$currPos; s1 = peg$parseEND(); if (s1 !== peg$FAILED) { - if (input.substr(peg$currPos, 7) === peg$c293) { - s2 = peg$c293; + if (input.substr(peg$currPos, 7) === peg$c292) { + s2 = peg$c292; peg$currPos += 7; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c294); } + if (peg$silentFails === 0) { peg$fail(peg$c293); } } if (s2 !== peg$FAILED) { s3 = peg$parse_(); @@ -9163,7 +9112,7 @@ module.exports = /* function peg$parseBEGIN_ALIGN() { var s0, s1, s2, s3; - var key = peg$currPos * 121 + 71, + var key = peg$currPos * 119 + 71, cached = peg$resultsCache[key]; if (cached) { @@ -9175,12 +9124,12 @@ module.exports = /* s0 = peg$currPos; s1 = peg$parseBEGIN(); if (s1 !== peg$FAILED) { - if (input.substr(peg$currPos, 7) === peg$c295) { - s2 = peg$c295; + if (input.substr(peg$currPos, 7) === peg$c294) { + s2 = peg$c294; peg$currPos += 7; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c296); } + if (peg$silentFails === 0) { peg$fail(peg$c295); } } if (s2 !== peg$FAILED) { s3 = peg$parse_(); @@ -9208,7 +9157,7 @@ module.exports = /* function peg$parseEND_ALIGN() { var s0, s1, s2, s3; - var key = peg$currPos * 121 + 72, + var key = peg$currPos * 119 + 72, cached = peg$resultsCache[key]; if (cached) { @@ -9220,12 +9169,12 @@ module.exports = /* s0 = peg$currPos; s1 = peg$parseEND(); if (s1 !== peg$FAILED) { - if (input.substr(peg$currPos, 7) === peg$c295) { - s2 = peg$c295; + if (input.substr(peg$currPos, 7) === peg$c294) { + s2 = peg$c294; peg$currPos += 7; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c296); } + if (peg$silentFails === 0) { peg$fail(peg$c295); } } if (s2 !== peg$FAILED) { s3 = peg$parse_(); @@ -9253,7 +9202,7 @@ module.exports = /* function peg$parseBEGIN_ALIGNED() { var s0, s1, s2, s3; - var key = peg$currPos * 121 + 73, + var key = peg$currPos * 119 + 73, cached = peg$resultsCache[key]; if (cached) { @@ -9265,12 +9214,12 @@ module.exports = /* s0 = peg$currPos; s1 = peg$parseBEGIN(); if (s1 !== peg$FAILED) { - if (input.substr(peg$currPos, 9) === peg$c297) { - s2 = peg$c297; + if (input.substr(peg$currPos, 9) === peg$c296) { + s2 = peg$c296; peg$currPos += 9; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c298); } + if (peg$silentFails === 0) { peg$fail(peg$c297); } } if (s2 !== peg$FAILED) { s3 = peg$parse_(); @@ -9298,7 +9247,7 @@ module.exports = /* function peg$parseEND_ALIGNED() { var s0, s1, s2, s3; - var key = peg$currPos * 121 + 74, + var key = peg$currPos * 119 + 74, cached = peg$resultsCache[key]; if (cached) { @@ -9310,12 +9259,12 @@ module.exports = /* s0 = peg$currPos; s1 = peg$parseEND(); if (s1 !== peg$FAILED) { - if (input.substr(peg$currPos, 9) === peg$c297) { - s2 = peg$c297; + if (input.substr(peg$currPos, 9) === peg$c296) { + s2 = peg$c296; peg$currPos += 9; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c298); } + if (peg$silentFails === 0) { peg$fail(peg$c297); } } if (s2 !== peg$FAILED) { s3 = peg$parse_(); @@ -9343,7 +9292,7 @@ module.exports = /* function peg$parseBEGIN_ALIGNAT() { var s0, s1, s2, s3; - var key = peg$currPos * 121 + 75, + var key = peg$currPos * 119 + 75, cached = peg$resultsCache[key]; if (cached) { @@ -9355,12 +9304,12 @@ module.exports = /* s0 = peg$currPos; s1 = peg$parseBEGIN(); if (s1 !== peg$FAILED) { - if (input.substr(peg$currPos, 9) === peg$c299) { - s2 = peg$c299; + if (input.substr(peg$currPos, 9) === peg$c298) { + s2 = peg$c298; peg$currPos += 9; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c300); } + if (peg$silentFails === 0) { peg$fail(peg$c299); } } if (s2 !== peg$FAILED) { s3 = peg$parse_(); @@ -9388,7 +9337,7 @@ module.exports = /* function peg$parseEND_ALIGNAT() { var s0, s1, s2, s3; - var key = peg$currPos * 121 + 76, + var key = peg$currPos * 119 + 76, cached = peg$resultsCache[key]; if (cached) { @@ -9400,12 +9349,12 @@ module.exports = /* s0 = peg$currPos; s1 = peg$parseEND(); if (s1 !== peg$FAILED) { - if (input.substr(peg$currPos, 9) === peg$c299) { - s2 = peg$c299; + if (input.substr(peg$currPos, 9) === peg$c298) { + s2 = peg$c298; peg$currPos += 9; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c300); } + if (peg$silentFails === 0) { peg$fail(peg$c299); } } if (s2 !== peg$FAILED) { s3 = peg$parse_(); @@ -9433,7 +9382,7 @@ module.exports = /* function peg$parseBEGIN_ALIGNEDAT() { var s0, s1, s2, s3; - var key = peg$currPos * 121 + 77, + var key = peg$currPos * 119 + 77, cached = peg$resultsCache[key]; if (cached) { @@ -9445,12 +9394,12 @@ module.exports = /* s0 = peg$currPos; s1 = peg$parseBEGIN(); if (s1 !== peg$FAILED) { - if (input.substr(peg$currPos, 11) === peg$c301) { - s2 = peg$c301; + if (input.substr(peg$currPos, 11) === peg$c300) { + s2 = peg$c300; peg$currPos += 11; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c302); } + if (peg$silentFails === 0) { peg$fail(peg$c301); } } if (s2 !== peg$FAILED) { s3 = peg$parse_(); @@ -9478,7 +9427,7 @@ module.exports = /* function peg$parseEND_ALIGNEDAT() { var s0, s1, s2, s3; - var key = peg$currPos * 121 + 78, + var key = peg$currPos * 119 + 78, cached = peg$resultsCache[key]; if (cached) { @@ -9490,12 +9439,12 @@ module.exports = /* s0 = peg$currPos; s1 = peg$parseEND(); if (s1 !== peg$FAILED) { - if (input.substr(peg$currPos, 11) === peg$c301) { - s2 = peg$c301; + if (input.substr(peg$currPos, 11) === peg$c300) { + s2 = peg$c300; peg$currPos += 11; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c302); } + if (peg$silentFails === 0) { peg$fail(peg$c301); } } if (s2 !== peg$FAILED) { s3 = peg$parse_(); @@ -9523,7 +9472,7 @@ module.exports = /* function peg$parseBEGIN_SMALLMATRIX() { var s0, s1, s2, s3; - var key = peg$currPos * 121 + 79, + var key = peg$currPos * 119 + 79, cached = peg$resultsCache[key]; if (cached) { @@ -9535,12 +9484,12 @@ module.exports = /* s0 = peg$currPos; s1 = peg$parseBEGIN(); if (s1 !== peg$FAILED) { - if (input.substr(peg$currPos, 13) === peg$c303) { - s2 = peg$c303; + if (input.substr(peg$currPos, 13) === peg$c302) { + s2 = peg$c302; peg$currPos += 13; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c304); } + if (peg$silentFails === 0) { peg$fail(peg$c303); } } if (s2 !== peg$FAILED) { s3 = peg$parse_(); @@ -9568,7 +9517,7 @@ module.exports = /* function peg$parseEND_SMALLMATRIX() { var s0, s1, s2, s3; - var key = peg$currPos * 121 + 80, + var key = peg$currPos * 119 + 80, cached = peg$resultsCache[key]; if (cached) { @@ -9580,12 +9529,12 @@ module.exports = /* s0 = peg$currPos; s1 = peg$parseEND(); if (s1 !== peg$FAILED) { - if (input.substr(peg$currPos, 13) === peg$c303) { - s2 = peg$c303; + if (input.substr(peg$currPos, 13) === peg$c302) { + s2 = peg$c302; peg$currPos += 13; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c304); } + if (peg$silentFails === 0) { peg$fail(peg$c303); } } if (s2 !== peg$FAILED) { s3 = peg$parse_(); @@ -9613,7 +9562,7 @@ module.exports = /* function peg$parseBEGIN_CASES() { var s0, s1, s2, s3; - var key = peg$currPos * 121 + 81, + var key = peg$currPos * 119 + 81, cached = peg$resultsCache[key]; if (cached) { @@ -9625,12 +9574,12 @@ module.exports = /* s0 = peg$currPos; s1 = peg$parseBEGIN(); if (s1 !== peg$FAILED) { - if (input.substr(peg$currPos, 7) === peg$c305) { - s2 = peg$c305; + if (input.substr(peg$currPos, 7) === peg$c304) { + s2 = peg$c304; peg$currPos += 7; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c306); } + if (peg$silentFails === 0) { peg$fail(peg$c305); } } if (s2 !== peg$FAILED) { s3 = peg$parse_(); @@ -9658,7 +9607,7 @@ module.exports = /* function peg$parseEND_CASES() { var s0, s1, s2, s3; - var key = peg$currPos * 121 + 82, + var key = peg$currPos * 119 + 82, cached = peg$resultsCache[key]; if (cached) { @@ -9670,12 +9619,12 @@ module.exports = /* s0 = peg$currPos; s1 = peg$parseEND(); if (s1 !== peg$FAILED) { - if (input.substr(peg$currPos, 7) === peg$c305) { - s2 = peg$c305; + if (input.substr(peg$currPos, 7) === peg$c304) { + s2 = peg$c304; peg$currPos += 7; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c306); } + if (peg$silentFails === 0) { peg$fail(peg$c305); } } if (s2 !== peg$FAILED) { s3 = peg$parse_(); @@ -9703,7 +9652,7 @@ module.exports = /* function peg$parseBEGIN_MULTLINE() { var s0, s1, s2, s3; - var key = peg$currPos * 121 + 83, + var key = peg$currPos * 119 + 83, cached = peg$resultsCache[key]; if (cached) { @@ -9715,12 +9664,12 @@ module.exports = /* s0 = peg$currPos; s1 = peg$parseBEGIN(); if (s1 !== peg$FAILED) { - if (input.substr(peg$currPos, 10) === peg$c307) { - s2 = peg$c307; + if (input.substr(peg$currPos, 10) === peg$c306) { + s2 = peg$c306; peg$currPos += 10; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c308); } + if (peg$silentFails === 0) { peg$fail(peg$c307); } } if (s2 !== peg$FAILED) { s3 = peg$parse_(); @@ -9748,7 +9697,7 @@ module.exports = /* function peg$parseEND_MULTLINE() { var s0, s1, s2, s3; - var key = peg$currPos * 121 + 84, + var key = peg$currPos * 119 + 84, cached = peg$resultsCache[key]; if (cached) { @@ -9760,102 +9709,12 @@ module.exports = /* s0 = peg$currPos; s1 = peg$parseEND(); if (s1 !== peg$FAILED) { - if (input.substr(peg$currPos, 10) === peg$c307) { - s2 = peg$c307; + if (input.substr(peg$currPos, 10) === peg$c306) { + s2 = peg$c306; peg$currPos += 10; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c308); } - } - if (s2 !== peg$FAILED) { - s3 = peg$parse_(); - if (s3 !== peg$FAILED) { - s1 = [s1, s2, s3]; - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parseBEGIN_MULTLINE_STAR() { - var s0, s1, s2, s3; - - var key = peg$currPos * 121 + 85, - cached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - s1 = peg$parseBEGIN(); - if (s1 !== peg$FAILED) { - if (input.substr(peg$currPos, 11) === peg$c309) { - s2 = peg$c309; - peg$currPos += 11; - } else { - s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c310); } - } - if (s2 !== peg$FAILED) { - s3 = peg$parse_(); - if (s3 !== peg$FAILED) { - s1 = [s1, s2, s3]; - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parseEND_MULTLINE_STAR() { - var s0, s1, s2, s3; - - var key = peg$currPos * 121 + 86, - cached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - s1 = peg$parseEND(); - if (s1 !== peg$FAILED) { - if (input.substr(peg$currPos, 11) === peg$c309) { - s2 = peg$c309; - peg$currPos += 11; - } else { - s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c310); } + if (peg$silentFails === 0) { peg$fail(peg$c307); } } if (s2 !== peg$FAILED) { s3 = peg$parse_(); @@ -9883,7 +9742,7 @@ module.exports = /* function peg$parseSQ_CLOSE() { var s0, s1, s2; - var key = peg$currPos * 121 + 87, + var key = peg$currPos * 119 + 85, cached = peg$resultsCache[key]; if (cached) { @@ -9922,7 +9781,7 @@ module.exports = /* function peg$parseCURLY_OPEN() { var s0, s1, s2; - var key = peg$currPos * 121 + 88, + var key = peg$currPos * 119 + 86, cached = peg$resultsCache[key]; if (cached) { @@ -9961,7 +9820,7 @@ module.exports = /* function peg$parseCURLY_CLOSE() { var s0, s1, s2; - var key = peg$currPos * 121 + 89, + var key = peg$currPos * 119 + 87, cached = peg$resultsCache[key]; if (cached) { @@ -10000,7 +9859,7 @@ module.exports = /* function peg$parsePAREN_OPEN() { var s0, s1, s2; - var key = peg$currPos * 121 + 90, + var key = peg$currPos * 119 + 88, cached = peg$resultsCache[key]; if (cached) { @@ -10011,11 +9870,11 @@ module.exports = /* s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 40) { - s1 = peg$c231; + s1 = peg$c230; peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c232); } + if (peg$silentFails === 0) { peg$fail(peg$c231); } } if (s1 !== peg$FAILED) { s2 = peg$parse_(); @@ -10032,12 +9891,12 @@ module.exports = /* } if (s0 === peg$FAILED) { s0 = peg$currPos; - if (input.substr(peg$currPos, 5) === peg$c311) { - s1 = peg$c311; + if (input.substr(peg$currPos, 5) === peg$c308) { + s1 = peg$c308; peg$currPos += 5; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c312); } + if (peg$silentFails === 0) { peg$fail(peg$c309); } } if (s1 !== peg$FAILED) { s2 = peg$parse_(); @@ -10054,12 +9913,12 @@ module.exports = /* } if (s0 === peg$FAILED) { s0 = peg$currPos; - if (input.substr(peg$currPos, 5) === peg$c313) { - s1 = peg$c313; + if (input.substr(peg$currPos, 5) === peg$c310) { + s1 = peg$c310; peg$currPos += 5; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c314); } + if (peg$silentFails === 0) { peg$fail(peg$c311); } } if (s1 !== peg$FAILED) { s2 = peg$parse_(); @@ -10076,12 +9935,12 @@ module.exports = /* } if (s0 === peg$FAILED) { s0 = peg$currPos; - if (input.substr(peg$currPos, 6) === peg$c315) { - s1 = peg$c315; + if (input.substr(peg$currPos, 6) === peg$c312) { + s1 = peg$c312; peg$currPos += 6; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c316); } + if (peg$silentFails === 0) { peg$fail(peg$c313); } } if (s1 !== peg$FAILED) { s2 = peg$parse_(); @@ -10098,12 +9957,12 @@ module.exports = /* } if (s0 === peg$FAILED) { s0 = peg$currPos; - if (input.substr(peg$currPos, 6) === peg$c317) { - s1 = peg$c317; + if (input.substr(peg$currPos, 6) === peg$c314) { + s1 = peg$c314; peg$currPos += 6; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c318); } + if (peg$silentFails === 0) { peg$fail(peg$c315); } } if (s1 !== peg$FAILED) { s2 = peg$parse_(); @@ -10120,12 +9979,12 @@ module.exports = /* } if (s0 === peg$FAILED) { s0 = peg$currPos; - if (input.substr(peg$currPos, 6) === peg$c319) { - s1 = peg$c319; + if (input.substr(peg$currPos, 6) === peg$c316) { + s1 = peg$c316; peg$currPos += 6; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c320); } + if (peg$silentFails === 0) { peg$fail(peg$c317); } } if (s1 !== peg$FAILED) { s2 = peg$parse_(); @@ -10142,12 +10001,12 @@ module.exports = /* } if (s0 === peg$FAILED) { s0 = peg$currPos; - if (input.substr(peg$currPos, 6) === peg$c321) { - s1 = peg$c321; + if (input.substr(peg$currPos, 6) === peg$c318) { + s1 = peg$c318; peg$currPos += 6; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c322); } + if (peg$silentFails === 0) { peg$fail(peg$c319); } } if (s1 !== peg$FAILED) { s2 = peg$parse_(); @@ -10164,12 +10023,12 @@ module.exports = /* } if (s0 === peg$FAILED) { s0 = peg$currPos; - if (input.substr(peg$currPos, 7) === peg$c323) { - s1 = peg$c323; + if (input.substr(peg$currPos, 7) === peg$c320) { + s1 = peg$c320; peg$currPos += 7; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c324); } + if (peg$silentFails === 0) { peg$fail(peg$c321); } } if (s1 !== peg$FAILED) { s2 = peg$parse_(); @@ -10186,12 +10045,12 @@ module.exports = /* } if (s0 === peg$FAILED) { s0 = peg$currPos; - if (input.substr(peg$currPos, 7) === peg$c325) { - s1 = peg$c325; + if (input.substr(peg$currPos, 7) === peg$c322) { + s1 = peg$c322; peg$currPos += 7; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c326); } + if (peg$silentFails === 0) { peg$fail(peg$c323); } } if (s1 !== peg$FAILED) { s2 = peg$parse_(); @@ -10208,12 +10067,12 @@ module.exports = /* } if (s0 === peg$FAILED) { s0 = peg$currPos; - if (input.substr(peg$currPos, 6) === peg$c327) { - s1 = peg$c327; + if (input.substr(peg$currPos, 6) === peg$c324) { + s1 = peg$c324; peg$currPos += 6; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c328); } + if (peg$silentFails === 0) { peg$fail(peg$c325); } } if (s1 !== peg$FAILED) { s2 = peg$parse_(); @@ -10246,7 +10105,7 @@ module.exports = /* function peg$parsePAREN_CLOSE() { var s0, s1, s2; - var key = peg$currPos * 121 + 91, + var key = peg$currPos * 119 + 89, cached = peg$resultsCache[key]; if (cached) { @@ -10257,11 +10116,11 @@ module.exports = /* s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 41) { - s1 = peg$c329; + s1 = peg$c326; peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c330); } + if (peg$silentFails === 0) { peg$fail(peg$c327); } } if (s1 !== peg$FAILED) { s2 = peg$parse_(); @@ -10278,12 +10137,12 @@ module.exports = /* } if (s0 === peg$FAILED) { s0 = peg$currPos; - if (input.substr(peg$currPos, 5) === peg$c331) { - s1 = peg$c331; + if (input.substr(peg$currPos, 5) === peg$c328) { + s1 = peg$c328; peg$currPos += 5; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c332); } + if (peg$silentFails === 0) { peg$fail(peg$c329); } } if (s1 !== peg$FAILED) { s2 = peg$parse_(); @@ -10300,12 +10159,12 @@ module.exports = /* } if (s0 === peg$FAILED) { s0 = peg$currPos; - if (input.substr(peg$currPos, 5) === peg$c333) { - s1 = peg$c333; + if (input.substr(peg$currPos, 5) === peg$c330) { + s1 = peg$c330; peg$currPos += 5; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c334); } + if (peg$silentFails === 0) { peg$fail(peg$c331); } } if (s1 !== peg$FAILED) { s2 = peg$parse_(); @@ -10322,12 +10181,12 @@ module.exports = /* } if (s0 === peg$FAILED) { s0 = peg$currPos; - if (input.substr(peg$currPos, 6) === peg$c335) { - s1 = peg$c335; + if (input.substr(peg$currPos, 6) === peg$c332) { + s1 = peg$c332; peg$currPos += 6; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c336); } + if (peg$silentFails === 0) { peg$fail(peg$c333); } } if (s1 !== peg$FAILED) { s2 = peg$parse_(); @@ -10344,12 +10203,12 @@ module.exports = /* } if (s0 === peg$FAILED) { s0 = peg$currPos; - if (input.substr(peg$currPos, 6) === peg$c337) { - s1 = peg$c337; + if (input.substr(peg$currPos, 6) === peg$c334) { + s1 = peg$c334; peg$currPos += 6; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c338); } + if (peg$silentFails === 0) { peg$fail(peg$c335); } } if (s1 !== peg$FAILED) { s2 = peg$parse_(); @@ -10366,12 +10225,12 @@ module.exports = /* } if (s0 === peg$FAILED) { s0 = peg$currPos; - if (input.substr(peg$currPos, 6) === peg$c339) { - s1 = peg$c339; + if (input.substr(peg$currPos, 6) === peg$c336) { + s1 = peg$c336; peg$currPos += 6; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c340); } + if (peg$silentFails === 0) { peg$fail(peg$c337); } } if (s1 !== peg$FAILED) { s2 = peg$parse_(); @@ -10388,12 +10247,12 @@ module.exports = /* } if (s0 === peg$FAILED) { s0 = peg$currPos; - if (input.substr(peg$currPos, 6) === peg$c341) { - s1 = peg$c341; + if (input.substr(peg$currPos, 6) === peg$c338) { + s1 = peg$c338; peg$currPos += 6; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c342); } + if (peg$silentFails === 0) { peg$fail(peg$c339); } } if (s1 !== peg$FAILED) { s2 = peg$parse_(); @@ -10410,12 +10269,12 @@ module.exports = /* } if (s0 === peg$FAILED) { s0 = peg$currPos; - if (input.substr(peg$currPos, 7) === peg$c343) { - s1 = peg$c343; + if (input.substr(peg$currPos, 7) === peg$c340) { + s1 = peg$c340; peg$currPos += 7; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c344); } + if (peg$silentFails === 0) { peg$fail(peg$c341); } } if (s1 !== peg$FAILED) { s2 = peg$parse_(); @@ -10432,12 +10291,12 @@ module.exports = /* } if (s0 === peg$FAILED) { s0 = peg$currPos; - if (input.substr(peg$currPos, 7) === peg$c345) { - s1 = peg$c345; + if (input.substr(peg$currPos, 7) === peg$c342) { + s1 = peg$c342; peg$currPos += 7; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c346); } + if (peg$silentFails === 0) { peg$fail(peg$c343); } } if (s1 !== peg$FAILED) { s2 = peg$parse_(); @@ -10453,12 +10312,12 @@ module.exports = /* s0 = peg$FAILED; } if (s0 === peg$FAILED) { - if (input.substr(peg$currPos, 7) === peg$c347) { - s0 = peg$c347; + if (input.substr(peg$currPos, 7) === peg$c344) { + s0 = peg$c344; peg$currPos += 7; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c348); } + if (peg$silentFails === 0) { peg$fail(peg$c345); } } } } @@ -10478,7 +10337,7 @@ module.exports = /* function peg$parseSUP() { var s0, s1, s2; - var key = peg$currPos * 121 + 92, + var key = peg$currPos * 119 + 90, cached = peg$resultsCache[key]; if (cached) { @@ -10517,7 +10376,7 @@ module.exports = /* function peg$parseSUB() { var s0, s1, s2; - var key = peg$currPos * 121 + 93, + var key = peg$currPos * 119 + 91, cached = peg$resultsCache[key]; if (cached) { @@ -10556,7 +10415,7 @@ module.exports = /* function peg$parsegeneric_func() { var s0, s1, s2, s3; - var key = peg$currPos * 121 + 94, + var key = peg$currPos * 119 + 92, cached = peg$resultsCache[key]; if (cached) { @@ -10567,11 +10426,11 @@ module.exports = /* s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 92) { - s1 = peg$c253; + s1 = peg$c252; peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c254); } + if (peg$silentFails === 0) { peg$fail(peg$c253); } } if (s1 !== peg$FAILED) { s2 = []; @@ -10586,7 +10445,7 @@ module.exports = /* } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c159(); + s1 = peg$c158(); s0 = s1; } else { peg$currPos = s0; @@ -10605,7 +10464,7 @@ module.exports = /* function peg$parseBIG() { var s0, s1, s2, s3; - var key = peg$currPos * 121 + 95, + var key = peg$currPos * 119 + 93, cached = peg$resultsCache[key]; if (cached) { @@ -10618,7 +10477,7 @@ module.exports = /* s1 = peg$parsegeneric_func(); if (s1 !== peg$FAILED) { peg$savedPos = peg$currPos; - s2 = peg$c349(s1); + s2 = peg$c346(s1); if (s2) { s2 = void 0; } else { @@ -10628,7 +10487,7 @@ module.exports = /* s3 = peg$parse_(); if (s3 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c271(s1); + s1 = peg$c270(s1); s0 = s1; } else { peg$currPos = s0; @@ -10651,7 +10510,7 @@ module.exports = /* function peg$parsePAREN() { var s0, s1, s2, s3, s4; - var key = peg$currPos * 121 + 96, + var key = peg$currPos * 119 + 94, cached = peg$resultsCache[key]; if (cached) { @@ -10664,7 +10523,7 @@ module.exports = /* s1 = peg$parsegeneric_func(); if (s1 !== peg$FAILED) { peg$savedPos = peg$currPos; - s2 = peg$c350(s1); + s2 = peg$c347(s1); if (s2) { s2 = void 0; } else { @@ -10679,7 +10538,7 @@ module.exports = /* } if (s3 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c271(s1); + s1 = peg$c270(s1); s0 = s1; } else { peg$currPos = s0; @@ -10702,7 +10561,7 @@ module.exports = /* function peg$parseFUN_AR1() { var s0, s1, s2, s3, s4; - var key = peg$currPos * 121 + 97, + var key = peg$currPos * 119 + 95, cached = peg$resultsCache[key]; if (cached) { @@ -10715,7 +10574,7 @@ module.exports = /* s1 = peg$parsegeneric_func(); if (s1 !== peg$FAILED) { peg$savedPos = peg$currPos; - s2 = peg$c351(s1); + s2 = peg$c348(s1); if (s2) { s2 = void 0; } else { @@ -10730,7 +10589,7 @@ module.exports = /* } if (s3 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c271(s1); + s1 = peg$c270(s1); s0 = s1; } else { peg$currPos = s0; @@ -10749,7 +10608,7 @@ module.exports = /* s1 = peg$parsegeneric_func(); if (s1 !== peg$FAILED) { peg$savedPos = peg$currPos; - s2 = peg$c352(s1); + s2 = peg$c349(s1); if (s2) { s2 = void 0; } else { @@ -10764,7 +10623,7 @@ module.exports = /* } if (s3 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c352(s1); + s1 = peg$c349(s1); s0 = s1; } else { peg$currPos = s0; @@ -10788,7 +10647,7 @@ module.exports = /* function peg$parseFUN_AR2() { var s0, s1, s2, s3, s4; - var key = peg$currPos * 121 + 98, + var key = peg$currPos * 119 + 96, cached = peg$resultsCache[key]; if (cached) { @@ -10801,7 +10660,7 @@ module.exports = /* s1 = peg$parsegeneric_func(); if (s1 !== peg$FAILED) { peg$savedPos = peg$currPos; - s2 = peg$c353(s1); + s2 = peg$c350(s1); if (s2) { s2 = void 0; } else { @@ -10816,7 +10675,7 @@ module.exports = /* } if (s3 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c271(s1); + s1 = peg$c270(s1); s0 = s1; } else { peg$currPos = s0; @@ -10839,7 +10698,7 @@ module.exports = /* function peg$parseFUN_AR3() { var s0, s1, s2, s3, s4; - var key = peg$currPos * 121 + 99, + var key = peg$currPos * 119 + 97, cached = peg$resultsCache[key]; if (cached) { @@ -10852,7 +10711,7 @@ module.exports = /* s1 = peg$parsegeneric_func(); if (s1 !== peg$FAILED) { peg$savedPos = peg$currPos; - s2 = peg$c354(s1); + s2 = peg$c351(s1); if (s2) { s2 = void 0; } else { @@ -10867,7 +10726,7 @@ module.exports = /* } if (s3 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c271(s1); + s1 = peg$c270(s1); s0 = s1; } else { peg$currPos = s0; @@ -10890,7 +10749,7 @@ module.exports = /* function peg$parseFUN_INFIX() { var s0, s1, s2, s3; - var key = peg$currPos * 121 + 100, + var key = peg$currPos * 119 + 98, cached = peg$resultsCache[key]; if (cached) { @@ -10903,7 +10762,7 @@ module.exports = /* s1 = peg$parsegeneric_func(); if (s1 !== peg$FAILED) { peg$savedPos = peg$currPos; - s2 = peg$c355(s1); + s2 = peg$c352(s1); if (s2) { s2 = void 0; } else { @@ -10913,7 +10772,7 @@ module.exports = /* s3 = peg$parse_(); if (s3 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c271(s1); + s1 = peg$c270(s1); s0 = s1; } else { peg$currPos = s0; @@ -10936,7 +10795,7 @@ module.exports = /* function peg$parseJACOBI() { var s0, s1, s2, s3, s4; - var key = peg$currPos * 121 + 101, + var key = peg$currPos * 119 + 99, cached = peg$resultsCache[key]; if (cached) { @@ -10949,7 +10808,7 @@ module.exports = /* s1 = peg$parsegeneric_func(); if (s1 !== peg$FAILED) { peg$savedPos = peg$currPos; - s2 = peg$c356(s1); + s2 = peg$c353(s1); if (s2) { s2 = void 0; } else { @@ -10964,7 +10823,7 @@ module.exports = /* } if (s3 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c271(s1); + s1 = peg$c270(s1); s0 = s1; } else { peg$currPos = s0; @@ -10987,7 +10846,7 @@ module.exports = /* function peg$parseLAGUERRE() { var s0, s1, s2, s3, s4; - var key = peg$currPos * 121 + 102, + var key = peg$currPos * 119 + 100, cached = peg$resultsCache[key]; if (cached) { @@ -11000,7 +10859,7 @@ module.exports = /* s1 = peg$parsegeneric_func(); if (s1 !== peg$FAILED) { peg$savedPos = peg$currPos; - s2 = peg$c357(s1); + s2 = peg$c354(s1); if (s2) { s2 = void 0; } else { @@ -11015,7 +10874,7 @@ module.exports = /* } if (s3 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c271(s1); + s1 = peg$c270(s1); s0 = s1; } else { peg$currPos = s0; @@ -11038,7 +10897,7 @@ module.exports = /* function peg$parseEJACOBI() { var s0; - var key = peg$currPos * 121 + 103, + var key = peg$currPos * 119 + 101, cached = peg$resultsCache[key]; if (cached) { @@ -11047,28 +10906,28 @@ module.exports = /* return cached.result; } - if (input.substr(peg$currPos, 2) === peg$c358) { - s0 = peg$c358; + if (input.substr(peg$currPos, 2) === peg$c355) { + s0 = peg$c355; peg$currPos += 2; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c359); } + if (peg$silentFails === 0) { peg$fail(peg$c356); } } if (s0 === peg$FAILED) { - if (input.substr(peg$currPos, 2) === peg$c360) { - s0 = peg$c360; + if (input.substr(peg$currPos, 2) === peg$c357) { + s0 = peg$c357; peg$currPos += 2; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c361); } + if (peg$silentFails === 0) { peg$fail(peg$c358); } } if (s0 === peg$FAILED) { - if (input.substr(peg$currPos, 2) === peg$c362) { - s0 = peg$c362; + if (input.substr(peg$currPos, 2) === peg$c359) { + s0 = peg$c359; peg$currPos += 2; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c363); } + if (peg$silentFails === 0) { peg$fail(peg$c360); } } } } @@ -11081,7 +10940,7 @@ module.exports = /* function peg$parseDECLh() { var s0, s1, s2, s3; - var key = peg$currPos * 121 + 104, + var key = peg$currPos * 119 + 102, cached = peg$resultsCache[key]; if (cached) { @@ -11094,7 +10953,7 @@ module.exports = /* s1 = peg$parsegeneric_func(); if (s1 !== peg$FAILED) { peg$savedPos = peg$currPos; - s2 = peg$c364(s1); + s2 = peg$c361(s1); if (s2) { s2 = void 0; } else { @@ -11104,7 +10963,7 @@ module.exports = /* s3 = peg$parse_(); if (s3 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c365(s1); + s1 = peg$c362(s1); s0 = s1; } else { peg$currPos = s0; @@ -11127,7 +10986,7 @@ module.exports = /* function peg$parseFUN_AR2nb() { var s0, s1, s2, s3, s4; - var key = peg$currPos * 121 + 105, + var key = peg$currPos * 119 + 103, cached = peg$resultsCache[key]; if (cached) { @@ -11140,7 +10999,7 @@ module.exports = /* s1 = peg$parsegeneric_func(); if (s1 !== peg$FAILED) { peg$savedPos = peg$currPos; - s2 = peg$c366(s1); + s2 = peg$c363(s1); if (s2) { s2 = void 0; } else { @@ -11155,7 +11014,7 @@ module.exports = /* } if (s3 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c271(s1); + s1 = peg$c270(s1); s0 = s1; } else { peg$currPos = s0; @@ -11178,7 +11037,7 @@ module.exports = /* function peg$parseLEFT() { var s0, s1, s2, s3; - var key = peg$currPos * 121 + 106, + var key = peg$currPos * 119 + 104, cached = peg$resultsCache[key]; if (cached) { @@ -11191,7 +11050,7 @@ module.exports = /* s1 = peg$parsegeneric_func(); if (s1 !== peg$FAILED) { peg$savedPos = peg$currPos; - s2 = peg$c367(s1); + s2 = peg$c364(s1); if (s2) { s2 = void 0; } else { @@ -11223,7 +11082,7 @@ module.exports = /* function peg$parseRIGHT() { var s0, s1, s2, s3; - var key = peg$currPos * 121 + 107, + var key = peg$currPos * 119 + 105, cached = peg$resultsCache[key]; if (cached) { @@ -11236,7 +11095,7 @@ module.exports = /* s1 = peg$parsegeneric_func(); if (s1 !== peg$FAILED) { peg$savedPos = peg$currPos; - s2 = peg$c368(s1); + s2 = peg$c365(s1); if (s2) { s2 = void 0; } else { @@ -11268,7 +11127,7 @@ module.exports = /* function peg$parseHLINE() { var s0, s1, s2, s3; - var key = peg$currPos * 121 + 108, + var key = peg$currPos * 119 + 106, cached = peg$resultsCache[key]; if (cached) { @@ -11281,7 +11140,7 @@ module.exports = /* s1 = peg$parsegeneric_func(); if (s1 !== peg$FAILED) { peg$savedPos = peg$currPos; - s2 = peg$c369(s1); + s2 = peg$c366(s1); if (s2) { s2 = void 0; } else { @@ -11291,7 +11150,7 @@ module.exports = /* s3 = peg$parse_(); if (s3 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c271(s1); + s1 = peg$c270(s1); s0 = s1; } else { peg$currPos = s0; @@ -11314,7 +11173,7 @@ module.exports = /* function peg$parseCOLOR() { var s0, s1, s2, s3, s4; - var key = peg$currPos * 121 + 109, + var key = peg$currPos * 119 + 107, cached = peg$resultsCache[key]; if (cached) { @@ -11327,7 +11186,7 @@ module.exports = /* s1 = peg$parsegeneric_func(); if (s1 !== peg$FAILED) { peg$savedPos = peg$currPos; - s2 = peg$c370(s1); + s2 = peg$c367(s1); if (s2) { s2 = void 0; } else { @@ -11339,7 +11198,7 @@ module.exports = /* s4 = peg$parseCOLOR_SPEC(); if (s4 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c371(s1, s4); + s1 = peg$c368(s1, s4); s0 = s1; } else { peg$currPos = s0; @@ -11366,7 +11225,7 @@ module.exports = /* function peg$parseDEFINECOLOR() { var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, s14, s15, s16, s17; - var key = peg$currPos * 121 + 110, + var key = peg$currPos * 119 + 108, cached = peg$resultsCache[key]; if (cached) { @@ -11379,7 +11238,7 @@ module.exports = /* s1 = peg$parsegeneric_func(); if (s1 !== peg$FAILED) { peg$savedPos = peg$currPos; - s2 = peg$c372(s1); + s2 = peg$c369(s1); if (s2) { s2 = void 0; } else { @@ -11432,12 +11291,12 @@ module.exports = /* s11 = peg$parse_(); if (s11 !== peg$FAILED) { s12 = peg$currPos; - if (input.substr(peg$currPos, 5).toLowerCase() === peg$c373) { + if (input.substr(peg$currPos, 5).toLowerCase() === peg$c370) { s13 = input.substr(peg$currPos, 5); peg$currPos += 5; } else { s13 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c374); } + if (peg$silentFails === 0) { peg$fail(peg$c371); } } if (s13 !== peg$FAILED) { s14 = peg$parse_(); @@ -11455,7 +11314,7 @@ module.exports = /* s17 = peg$parseCOLOR_SPEC_NAMED(); if (s17 !== peg$FAILED) { peg$savedPos = s12; - s13 = peg$c375(s1, s6, s17); + s13 = peg$c372(s1, s6, s17); s12 = s13; } else { peg$currPos = s12; @@ -11479,12 +11338,12 @@ module.exports = /* } if (s12 === peg$FAILED) { s12 = peg$currPos; - if (input.substr(peg$currPos, 4).toLowerCase() === peg$c376) { + if (input.substr(peg$currPos, 4).toLowerCase() === peg$c373) { s13 = input.substr(peg$currPos, 4); peg$currPos += 4; } else { s13 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c377); } + if (peg$silentFails === 0) { peg$fail(peg$c374); } } if (s13 !== peg$FAILED) { s14 = peg$parse_(); @@ -11502,7 +11361,7 @@ module.exports = /* s17 = peg$parseCOLOR_SPEC_GRAY(); if (s17 !== peg$FAILED) { peg$savedPos = s12; - s13 = peg$c378(s1, s6, s17); + s13 = peg$c375(s1, s6, s17); s12 = s13; } else { peg$currPos = s12; @@ -11526,12 +11385,12 @@ module.exports = /* } if (s12 === peg$FAILED) { s12 = peg$currPos; - if (input.substr(peg$currPos, 3) === peg$c379) { - s13 = peg$c379; + if (input.substr(peg$currPos, 3) === peg$c376) { + s13 = peg$c376; peg$currPos += 3; } else { s13 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c380); } + if (peg$silentFails === 0) { peg$fail(peg$c377); } } if (s13 !== peg$FAILED) { s14 = peg$parse_(); @@ -11549,7 +11408,7 @@ module.exports = /* s17 = peg$parseCOLOR_SPEC_rgb(); if (s17 !== peg$FAILED) { peg$savedPos = s12; - s13 = peg$c381(s1, s6, s17); + s13 = peg$c378(s1, s6, s17); s12 = s13; } else { peg$currPos = s12; @@ -11573,12 +11432,12 @@ module.exports = /* } if (s12 === peg$FAILED) { s12 = peg$currPos; - if (input.substr(peg$currPos, 3) === peg$c382) { - s13 = peg$c382; + if (input.substr(peg$currPos, 3) === peg$c379) { + s13 = peg$c379; peg$currPos += 3; } else { s13 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c383); } + if (peg$silentFails === 0) { peg$fail(peg$c380); } } if (s13 !== peg$FAILED) { s14 = peg$parse_(); @@ -11596,7 +11455,7 @@ module.exports = /* s17 = peg$parseCOLOR_SPEC_RGB(); if (s17 !== peg$FAILED) { peg$savedPos = s12; - s13 = peg$c381(s1, s6, s17); + s13 = peg$c378(s1, s6, s17); s12 = s13; } else { peg$currPos = s12; @@ -11620,12 +11479,12 @@ module.exports = /* } if (s12 === peg$FAILED) { s12 = peg$currPos; - if (input.substr(peg$currPos, 4).toLowerCase() === peg$c384) { + if (input.substr(peg$currPos, 4).toLowerCase() === peg$c381) { s13 = input.substr(peg$currPos, 4); peg$currPos += 4; } else { s13 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c385); } + if (peg$silentFails === 0) { peg$fail(peg$c382); } } if (s13 !== peg$FAILED) { s14 = peg$parse_(); @@ -11643,7 +11502,7 @@ module.exports = /* s17 = peg$parseCOLOR_SPEC_CMYK(); if (s17 !== peg$FAILED) { peg$savedPos = s12; - s13 = peg$c386(s1, s6, s17); + s13 = peg$c383(s1, s6, s17); s12 = s13; } else { peg$currPos = s12; @@ -11671,7 +11530,7 @@ module.exports = /* } if (s12 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c387(s1, s6, s12); + s1 = peg$c384(s1, s6, s12); s0 = s1; } else { peg$currPos = s0; @@ -11730,7 +11589,7 @@ module.exports = /* function peg$parseCOLOR_SPEC() { var s0, s1, s2, s3, s4, s5, s6, s7; - var key = peg$currPos * 121 + 111, + var key = peg$currPos * 119 + 109, cached = peg$resultsCache[key]; if (cached) { @@ -11752,12 +11611,12 @@ module.exports = /* if (s1 !== peg$FAILED) { s2 = peg$parse_(); if (s2 !== peg$FAILED) { - if (input.substr(peg$currPos, 5).toLowerCase() === peg$c373) { + if (input.substr(peg$currPos, 5).toLowerCase() === peg$c370) { s3 = input.substr(peg$currPos, 5); peg$currPos += 5; } else { s3 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c374); } + if (peg$silentFails === 0) { peg$fail(peg$c371); } } if (s3 !== peg$FAILED) { s4 = peg$parse_(); @@ -11775,7 +11634,7 @@ module.exports = /* s7 = peg$parseCOLOR_SPEC_NAMED(); if (s7 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c388(s7); + s1 = peg$c385(s7); s0 = s1; } else { peg$currPos = s0; @@ -11817,12 +11676,12 @@ module.exports = /* if (s1 !== peg$FAILED) { s2 = peg$parse_(); if (s2 !== peg$FAILED) { - if (input.substr(peg$currPos, 4).toLowerCase() === peg$c376) { + if (input.substr(peg$currPos, 4).toLowerCase() === peg$c373) { s3 = input.substr(peg$currPos, 4); peg$currPos += 4; } else { s3 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c377); } + if (peg$silentFails === 0) { peg$fail(peg$c374); } } if (s3 !== peg$FAILED) { s4 = peg$parse_(); @@ -11840,7 +11699,7 @@ module.exports = /* s7 = peg$parseCOLOR_SPEC_GRAY(); if (s7 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c389(s7); + s1 = peg$c386(s7); s0 = s1; } else { peg$currPos = s0; @@ -11882,12 +11741,12 @@ module.exports = /* if (s1 !== peg$FAILED) { s2 = peg$parse_(); if (s2 !== peg$FAILED) { - if (input.substr(peg$currPos, 3) === peg$c379) { - s3 = peg$c379; + if (input.substr(peg$currPos, 3) === peg$c376) { + s3 = peg$c376; peg$currPos += 3; } else { s3 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c380); } + if (peg$silentFails === 0) { peg$fail(peg$c377); } } if (s3 !== peg$FAILED) { s4 = peg$parse_(); @@ -11905,7 +11764,7 @@ module.exports = /* s7 = peg$parseCOLOR_SPEC_rgb(); if (s7 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c390(s7); + s1 = peg$c387(s7); s0 = s1; } else { peg$currPos = s0; @@ -11947,12 +11806,12 @@ module.exports = /* if (s1 !== peg$FAILED) { s2 = peg$parse_(); if (s2 !== peg$FAILED) { - if (input.substr(peg$currPos, 3) === peg$c382) { - s3 = peg$c382; + if (input.substr(peg$currPos, 3) === peg$c379) { + s3 = peg$c379; peg$currPos += 3; } else { s3 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c383); } + if (peg$silentFails === 0) { peg$fail(peg$c380); } } if (s3 !== peg$FAILED) { s4 = peg$parse_(); @@ -11970,7 +11829,7 @@ module.exports = /* s7 = peg$parseCOLOR_SPEC_RGB(); if (s7 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c390(s7); + s1 = peg$c387(s7); s0 = s1; } else { peg$currPos = s0; @@ -12012,12 +11871,12 @@ module.exports = /* if (s1 !== peg$FAILED) { s2 = peg$parse_(); if (s2 !== peg$FAILED) { - if (input.substr(peg$currPos, 4).toLowerCase() === peg$c384) { + if (input.substr(peg$currPos, 4).toLowerCase() === peg$c381) { s3 = input.substr(peg$currPos, 4); peg$currPos += 4; } else { s3 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c385); } + if (peg$silentFails === 0) { peg$fail(peg$c382); } } if (s3 !== peg$FAILED) { s4 = peg$parse_(); @@ -12035,7 +11894,7 @@ module.exports = /* s7 = peg$parseCOLOR_SPEC_CMYK(); if (s7 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c391(s7); + s1 = peg$c388(s7); s0 = s1; } else { peg$currPos = s0; @@ -12079,7 +11938,7 @@ module.exports = /* function peg$parseCOLOR_SPEC_NAMED() { var s0, s1, s2, s3, s4, s5, s6; - var key = peg$currPos * 121 + 112, + var key = peg$currPos * 119 + 110, cached = peg$resultsCache[key]; if (cached) { @@ -12123,7 +11982,7 @@ module.exports = /* s6 = peg$parse_(); if (s6 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c392(s3); + s1 = peg$c389(s3); s0 = s1; } else { peg$currPos = s0; @@ -12158,7 +12017,7 @@ module.exports = /* function peg$parseCOLOR_SPEC_GRAY() { var s0, s1, s2, s3, s4; - var key = peg$currPos * 121 + 113, + var key = peg$currPos * 119 + 111, cached = peg$resultsCache[key]; if (cached) { @@ -12198,7 +12057,7 @@ module.exports = /* } if (s4 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c393(s3); + s1 = peg$c390(s3); s0 = s1; } else { peg$currPos = s0; @@ -12225,7 +12084,7 @@ module.exports = /* function peg$parseCOLOR_SPEC_rgb() { var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11; - var key = peg$currPos * 121 + 114, + var key = peg$currPos * 119 + 112, cached = peg$resultsCache[key]; if (cached) { @@ -12282,7 +12141,7 @@ module.exports = /* s11 = peg$parse_(); if (s11 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c394(s3, s6, s9); + s1 = peg$c391(s3, s6, s9); s0 = s1; } else { peg$currPos = s0; @@ -12337,7 +12196,7 @@ module.exports = /* function peg$parseCOLOR_SPEC_RGB() { var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11; - var key = peg$currPos * 121 + 115, + var key = peg$currPos * 119 + 113, cached = peg$resultsCache[key]; if (cached) { @@ -12394,7 +12253,7 @@ module.exports = /* s11 = peg$parse_(); if (s11 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c394(s3, s6, s9); + s1 = peg$c391(s3, s6, s9); s0 = s1; } else { peg$currPos = s0; @@ -12449,7 +12308,7 @@ module.exports = /* function peg$parseCOLOR_SPEC_CMYK() { var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, s14; - var key = peg$currPos * 121 + 116, + var key = peg$currPos * 119 + 114, cached = peg$resultsCache[key]; if (cached) { @@ -12518,7 +12377,7 @@ module.exports = /* s14 = peg$parse_(); if (s14 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c395(s3, s6, s9, s12); + s1 = peg$c392(s3, s6, s9, s12); s0 = s1; } else { peg$currPos = s0; @@ -12585,7 +12444,7 @@ module.exports = /* function peg$parseCNUM255() { var s0, s1, s2, s3, s4, s5, s6; - var key = peg$currPos * 121 + 117, + var key = peg$currPos * 119 + 115, cached = peg$resultsCache[key]; if (cached) { @@ -12597,37 +12456,37 @@ module.exports = /* s0 = peg$currPos; s1 = peg$currPos; if (input.charCodeAt(peg$currPos) === 48) { - s2 = peg$c396; + s2 = peg$c393; peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c397); } + if (peg$silentFails === 0) { peg$fail(peg$c394); } } if (s2 === peg$FAILED) { s2 = peg$currPos; - if (peg$c398.test(input.charAt(peg$currPos))) { + if (peg$c395.test(input.charAt(peg$currPos))) { s3 = input.charAt(peg$currPos); peg$currPos++; } else { s3 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c399); } + if (peg$silentFails === 0) { peg$fail(peg$c396); } } if (s3 !== peg$FAILED) { s4 = peg$currPos; - if (peg$c167.test(input.charAt(peg$currPos))) { + if (peg$c166.test(input.charAt(peg$currPos))) { s5 = input.charAt(peg$currPos); peg$currPos++; } else { s5 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c168); } + if (peg$silentFails === 0) { peg$fail(peg$c167); } } if (s5 !== peg$FAILED) { - if (peg$c167.test(input.charAt(peg$currPos))) { + if (peg$c166.test(input.charAt(peg$currPos))) { s6 = input.charAt(peg$currPos); peg$currPos++; } else { s6 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c168); } + if (peg$silentFails === 0) { peg$fail(peg$c167); } } if (s6 === peg$FAILED) { s6 = null; @@ -12665,7 +12524,7 @@ module.exports = /* } if (s1 !== peg$FAILED) { peg$savedPos = peg$currPos; - s2 = peg$c400(s1); + s2 = peg$c397(s1); if (s2) { s2 = void 0; } else { @@ -12675,7 +12534,7 @@ module.exports = /* s3 = peg$parse_(); if (s3 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c401(s1); + s1 = peg$c398(s1); s0 = s1; } else { peg$currPos = s0; @@ -12698,7 +12557,7 @@ module.exports = /* function peg$parseCNUM() { var s0, s1, s2, s3, s4, s5, s6; - var key = peg$currPos * 121 + 118, + var key = peg$currPos * 119 + 116, cached = peg$resultsCache[key]; if (cached) { @@ -12711,41 +12570,41 @@ module.exports = /* s1 = peg$currPos; s2 = peg$currPos; if (input.charCodeAt(peg$currPos) === 48) { - s3 = peg$c396; + s3 = peg$c393; peg$currPos++; } else { s3 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c397); } + if (peg$silentFails === 0) { peg$fail(peg$c394); } } if (s3 === peg$FAILED) { s3 = null; } if (s3 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 46) { - s4 = peg$c190; + s4 = peg$c189; peg$currPos++; } else { s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c191); } + if (peg$silentFails === 0) { peg$fail(peg$c190); } } if (s4 !== peg$FAILED) { s5 = []; - if (peg$c167.test(input.charAt(peg$currPos))) { + if (peg$c166.test(input.charAt(peg$currPos))) { s6 = input.charAt(peg$currPos); peg$currPos++; } else { s6 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c168); } + if (peg$silentFails === 0) { peg$fail(peg$c167); } } if (s6 !== peg$FAILED) { while (s6 !== peg$FAILED) { s5.push(s6); - if (peg$c167.test(input.charAt(peg$currPos))) { + if (peg$c166.test(input.charAt(peg$currPos))) { s6 = input.charAt(peg$currPos); peg$currPos++; } else { s6 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c168); } + if (peg$silentFails === 0) { peg$fail(peg$c167); } } } } else { @@ -12775,7 +12634,7 @@ module.exports = /* s2 = peg$parse_(); if (s2 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c402(s1); + s1 = peg$c399(s1); s0 = s1; } else { peg$currPos = s0; @@ -12789,20 +12648,20 @@ module.exports = /* s0 = peg$currPos; s1 = peg$currPos; s2 = peg$currPos; - if (peg$c403.test(input.charAt(peg$currPos))) { + if (peg$c400.test(input.charAt(peg$currPos))) { s3 = input.charAt(peg$currPos); peg$currPos++; } else { s3 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c404); } + if (peg$silentFails === 0) { peg$fail(peg$c401); } } if (s3 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 46) { - s4 = peg$c190; + s4 = peg$c189; peg$currPos++; } else { s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c191); } + if (peg$silentFails === 0) { peg$fail(peg$c190); } } if (s4 === peg$FAILED) { s4 = null; @@ -12827,7 +12686,7 @@ module.exports = /* s2 = peg$parse_(); if (s2 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c402(s1); + s1 = peg$c399(s1); s0 = s1; } else { peg$currPos = s0; @@ -12847,7 +12706,7 @@ module.exports = /* function peg$parseimpossible() { var s0; - var key = peg$currPos * 121 + 119, + var key = peg$currPos * 119 + 117, cached = peg$resultsCache[key]; if (cached) { @@ -12857,7 +12716,7 @@ module.exports = /* } peg$savedPos = peg$currPos; - s0 = peg$c405(); + s0 = peg$c402(); if (s0) { s0 = void 0; } else { @@ -12872,7 +12731,7 @@ module.exports = /* function peg$parseEOF() { var s0; - var key = peg$currPos * 121 + 120, + var key = peg$currPos * 119 + 118, cached = peg$resultsCache[key]; if (cached) { @@ -12882,7 +12741,7 @@ module.exports = /* } peg$savedPos = peg$currPos; - s0 = peg$c406(); + s0 = peg$c403(); if (s0) { s0 = void 0; } else { diff --git a/lib/parser.pegjs b/lib/parser.pegjs index 14ff0a3..59c47e7 100644 --- a/lib/parser.pegjs +++ b/lib/parser.pegjs @@ -220,8 +220,6 @@ lit { return ast.Tex.MATRIX("cases", lst2arr(m)); } / BEGIN_MULTLINE m:multline END_MULTLINE { return ast.Tex.MULTLINE("multline", lst2arr(m)); } - / BEGIN_MULTLINE_STAR m:multline END_MULTLINE_STAR - { return ast.Tex.MULTLINE("multline*", lst2arr(m)); } / "\\begin{" alpha+ "}" /* better error messages for unknown environments */ { throw new peg$SyntaxError("Illegal TeX function", [], text(), location()); } / f:generic_func &{ return !tu.all_functions[f]; } @@ -300,8 +298,6 @@ litstuff = //basically lit without DELIMITER or LITERAL as an option (replaced b { return ast.Tex.MATRIX("cases", lst2arr(m)); } / BEGIN_MULTLINE m:multline END_MULTLINE { return ast.Tex.MULTLINE("multline", lst2arr(m)); } - / BEGIN_MULTLINE_STAR m:multline END_MULTLINE_STAR - { return ast.Tex.MULTLINE("multline*", lst2arr(m)); } / "\\begin{" alpha+ "}" /* better error messages for unknown environments */ { throw new peg$SyntaxError("Illegal TeX function", [], text(), location()); } / f:generic_func &{ return !tu.all_functions[f]; } @@ -564,10 +560,6 @@ BEGIN_MULTLINE = BEGIN "{multline}" _ END_MULTLINE = END "{multline}" _ -BEGIN_MULTLINE_STAR - = BEGIN "{multline*}" _ -END_MULTLINE_STAR - = END "{multline*}" _ SQ_CLOSE = "]" _