diff --git a/.jshintignore b/.jshintignore index 3c3629e..b6cb45f 100644 --- a/.jshintignore +++ b/.jshintignore @@ -1 +1,3 @@ node_modules +lib/parser.js + 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..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,17 +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); - }, + 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 7f55518..47a8f8b 100644 --- a/lib/build-parser.js +++ b/lib/build-parser.js @@ -8,20 +8,13 @@ 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 - allowedStartTules: [ "start" ] + 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'); diff --git a/lib/parser.js b/lib/parser.js index 5cac689..f623bd1 100644 --- a/lib/parser.js +++ b/lib/parser.js @@ -1,22 +1,18 @@ -/* 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; } 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; @@ -30,63 +26,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); + } - peg$FAILED = {}, + function describeExpected(expected) { + var descriptions = new Array(expected.length), + i, j; + + for (i = 0; i < expected.length; i++) { + descriptions[i] = describeExpectation(expected[i]); + } + + descriptions.sort(); + + if (descriptions.length > 0) { + for (i = 1, j = 1; i < descriptions.length; i++) { + if (descriptions[i - 1] !== descriptions[i]) { + descriptions[j] = descriptions[i]; + j++; + } + } + descriptions.length = j; + } + + switch (descriptions.length) { + case 1: + return descriptions[0]; + + case 2: + return descriptions[0] + " or " + descriptions[1]; + + default: + return descriptions.slice(0, -1).join(", ") + + ", or " + + descriptions[descriptions.length - 1]; + } + } + + function describeFound(found) { + return found ? "\"" + literalEscape(found) + "\"" : "end of input"; + } + + return "Expected " + describeExpected(expected) + " but " + describeFound(found) + " found."; + }; + + function peg$parse(input, options) { + options = options !== void 0 ? options : {}; + + var peg$FAILED = {}, peg$startRuleFunctions = { 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 +210,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 +257,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()); }, @@ -177,20 +278,21 @@ 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) { return ast.Tex.MULTLINE("multline", lst2arr(m)); }, + 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(""); @@ -204,267 +306,271 @@ 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$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$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$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, - peg$posDetailsCache = [{ line: 1, column: 1, seenCR: false }], + peg$posDetailsCache = [{ line: 1, column: 1 }], peg$maxFailPos = 0, peg$maxFailExpected = [], peg$silentFails = 0, @@ -489,27 +595,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; @@ -522,23 +645,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++; @@ -578,71 +693,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 @@ -652,7 +709,7 @@ module.exports = (function() { function peg$parsestart() { var s0, s1, s2; - var key = peg$currPos * 115 + 0, + var key = peg$currPos * 119 + 0, cached = peg$resultsCache[key]; if (cached) { @@ -686,7 +743,7 @@ module.exports = (function() { function peg$parse_() { var s0, s1; - var key = peg$currPos * 115 + 1, + var key = peg$currPos * 119 + 1, cached = peg$resultsCache[key]; if (cached) { @@ -722,7 +779,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 * 119 + 2, cached = peg$resultsCache[key]; if (cached) { @@ -1112,7 +1169,7 @@ module.exports = (function() { function peg$parsetex_expr() { var s0, s1, s2, s3, s4; - var key = peg$currPos * 115 + 3, + var key = peg$currPos * 119 + 3, cached = peg$resultsCache[key]; if (cached) { @@ -1206,7 +1263,7 @@ module.exports = (function() { function peg$parseexpr() { var s0, s1; - var key = peg$currPos * 115 + 4, + var key = peg$currPos * 119 + 4, cached = peg$resultsCache[key]; if (cached) { @@ -1234,7 +1291,7 @@ module.exports = (function() { function peg$parsene_expr() { var s0, s1, s2; - var key = peg$currPos * 115 + 5, + var key = peg$currPos * 119 + 5, cached = peg$resultsCache[key]; if (cached) { @@ -1304,7 +1361,7 @@ module.exports = (function() { function peg$parselitsq_aq() { var s0; - var key = peg$currPos * 115 + 6, + var key = peg$currPos * 119 + 6, cached = peg$resultsCache[key]; if (cached) { @@ -1332,7 +1389,7 @@ module.exports = (function() { function peg$parselitsq_fq() { var s0, s1, s2, s3; - var key = peg$currPos * 115 + 7, + var key = peg$currPos * 119 + 7, cached = peg$resultsCache[key]; if (cached) { @@ -1396,7 +1453,7 @@ module.exports = (function() { function peg$parselitsq_uq() { var s0, s1, s2, s3; - var key = peg$currPos * 115 + 8, + var key = peg$currPos * 119 + 8, cached = peg$resultsCache[key]; if (cached) { @@ -1436,7 +1493,7 @@ module.exports = (function() { function peg$parselitsq_dq() { var s0, s1, s2, s3; - var key = peg$currPos * 115 + 9, + var key = peg$currPos * 119 + 9, cached = peg$resultsCache[key]; if (cached) { @@ -1476,7 +1533,7 @@ module.exports = (function() { function peg$parselitsq_zq() { var s0, s1; - var key = peg$currPos * 115 + 10, + var key = peg$currPos * 119 + 10, cached = peg$resultsCache[key]; if (cached) { @@ -1501,7 +1558,7 @@ module.exports = (function() { function peg$parseexpr_nosqc() { var s0, s1, s2; - var key = peg$currPos * 115 + 11, + var key = peg$currPos * 119 + 11, cached = peg$resultsCache[key]; if (cached) { @@ -1544,7 +1601,7 @@ module.exports = (function() { function peg$parselit_aq() { var s0; - var key = peg$currPos * 115 + 12, + var key = peg$currPos * 119 + 12, cached = peg$resultsCache[key]; if (cached) { @@ -1578,7 +1635,7 @@ module.exports = (function() { function peg$parselit_fq() { var s0, s1, s2, s3; - var key = peg$currPos * 115 + 13, + var key = peg$currPos * 119 + 13, cached = peg$resultsCache[key]; if (cached) { @@ -1666,7 +1723,7 @@ module.exports = (function() { function peg$parselit_uq() { var s0, s1, s2, s3; - var key = peg$currPos * 115 + 14, + var key = peg$currPos * 119 + 14, cached = peg$resultsCache[key]; if (cached) { @@ -1706,7 +1763,7 @@ module.exports = (function() { function peg$parselit_dq() { var s0, s1, s2, s3; - var key = peg$currPos * 115 + 15, + var key = peg$currPos * 119 + 15, cached = peg$resultsCache[key]; if (cached) { @@ -1746,7 +1803,7 @@ module.exports = (function() { function peg$parselit_uqn() { var s0, s1, s2; - var key = peg$currPos * 115 + 16, + var key = peg$currPos * 119 + 16, cached = peg$resultsCache[key]; if (cached) { @@ -1780,7 +1837,7 @@ module.exports = (function() { function peg$parselit_dqn() { var s0, s1, s2; - var key = peg$currPos * 115 + 17, + var key = peg$currPos * 119 + 17, cached = peg$resultsCache[key]; if (cached) { @@ -1814,7 +1871,7 @@ module.exports = (function() { function peg$parseleft() { var s0, s1, s2; - var key = peg$currPos * 115 + 18, + var key = peg$currPos * 119 + 18, cached = peg$resultsCache[key]; if (cached) { @@ -1866,7 +1923,7 @@ module.exports = (function() { function peg$parseright() { var s0, s1, s2; - var key = peg$currPos * 115 + 19, + var key = peg$currPos * 119 + 19, cached = peg$resultsCache[key]; if (cached) { @@ -1918,7 +1975,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 * 119 + 20, cached = peg$resultsCache[key]; if (cached) { @@ -3479,35 +3536,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 +3559,40 @@ module.exports = (function() { } if (s0 === peg$FAILED) { s0 = peg$currPos; - s1 = peg$parsegeneric_func(); + 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) { - peg$savedPos = peg$currPos; - s2 = peg$c136(s1); - if (s2) { - s2 = void 0; + 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$c137(s1); - s0 = s1; + 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$c136(); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } } else { peg$currPos = s0; s0 = peg$FAILED; @@ -3544,6 +3601,30 @@ module.exports = (function() { 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$c137(s1); + if (s2) { + s2 = void 0; + } else { + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c138(s1); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } } } } @@ -3597,7 +3678,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 * 119 + 21, cached = peg$resultsCache[key]; if (cached) { @@ -4392,7 +4473,7 @@ module.exports = (function() { s2 = peg$parselit(); if (s2 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c138(s1, s2); + s1 = peg$c139(s1, s2); s0 = s1; } else { peg$currPos = s0; @@ -4409,7 +4490,7 @@ module.exports = (function() { s2 = peg$parselit(); if (s2 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c139(s1, s2); + s1 = peg$c140(s1, s2); s0 = s1; } else { peg$currPos = s0; @@ -4474,7 +4555,7 @@ module.exports = (function() { s3 = peg$parselit(); if (s3 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c140(s1, s2, s3); + s1 = peg$c141(s1, s2, s3); s0 = s1; } else { peg$currPos = s0; @@ -4499,7 +4580,7 @@ module.exports = (function() { s4 = peg$parselit(); if (s4 !== peg$FAILED) { peg$savedPos = peg$currPos; - s5 = peg$c141(s1, s2, s3, s4); + s5 = peg$c142(s1, s2, s3, s4); if (s5) { s5 = void 0; } else { @@ -5182,35 +5263,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 +5286,40 @@ module.exports = (function() { } if (s0 === peg$FAILED) { s0 = peg$currPos; - s1 = peg$parsegeneric_func(); + 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) { - peg$savedPos = peg$currPos; - s2 = peg$c136(s1); - if (s2) { - s2 = void 0; + 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$c142(s1); - s0 = s1; + 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$c136(); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } } else { peg$currPos = s0; s0 = peg$FAILED; @@ -5249,12 +5330,36 @@ module.exports = (function() { } if (s0 === peg$FAILED) { s0 = peg$currPos; - s1 = peg$parseLITERALPART(); + s1 = peg$parsegeneric_func(); if (s1 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c143(s1); + peg$savedPos = peg$currPos; + s2 = peg$c137(s1); + if (s2) { + s2 = void 0; + } else { + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c143(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$c144(s1); + } + s0 = s1; } - s0 = s1; } } } @@ -5309,7 +5414,7 @@ module.exports = (function() { function peg$parselitparen1() { var s0, s1, s2, s3, s4, s5; - var key = peg$currPos * 115 + 22, + var key = peg$currPos * 119 + 22, cached = peg$resultsCache[key]; if (cached) { @@ -5342,7 +5447,7 @@ module.exports = (function() { } if (s5 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c144(s3); + s1 = peg$c145(s3); s0 = s1; } else { peg$currPos = s0; @@ -5369,7 +5474,7 @@ module.exports = (function() { s1 = peg$parselitparen(); if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c144(s1); + s1 = peg$c145(s1); } s0 = s1; } @@ -5382,7 +5487,7 @@ module.exports = (function() { function peg$parselitparen() { var s0, s1, s2, s3, s4, s5; - var key = peg$currPos * 115 + 23, + var key = peg$currPos * 119 + 23, cached = peg$resultsCache[key]; if (cached) { @@ -5403,7 +5508,7 @@ module.exports = (function() { s5 = peg$parsePAREN_CLOSE(); if (s5 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c145(s3); + s1 = peg$c146(s3); s0 = s1; } else { peg$currPos = s0; @@ -5434,7 +5539,7 @@ module.exports = (function() { function peg$parselitplus() { var s0, s1, s2; - var key = peg$currPos * 115 + 24, + var key = peg$currPos * 119 + 24, cached = peg$resultsCache[key]; if (cached) { @@ -5447,7 +5552,7 @@ module.exports = (function() { s1 = peg$parselitstuff(); if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c144(s1); + s1 = peg$c145(s1); } s0 = s1; if (s0 === peg$FAILED) { @@ -5464,7 +5569,7 @@ module.exports = (function() { } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c146(s1); + s1 = peg$c147(s1); } s0 = s1; if (s0 === peg$FAILED) { @@ -5472,7 +5577,7 @@ module.exports = (function() { s1 = peg$c50; if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c147(); + s1 = peg$c148(); } s0 = s1; } @@ -5486,7 +5591,7 @@ module.exports = (function() { function peg$parsearray() { var s0, s1, s2; - var key = peg$currPos * 115 + 25, + var key = peg$currPos * 119 + 25, cached = peg$resultsCache[key]; if (cached) { @@ -5501,7 +5606,7 @@ module.exports = (function() { s2 = peg$parsematrix(); if (s2 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c148(s1, s2); + s1 = peg$c149(s1, s2); s0 = s1; } else { peg$currPos = s0; @@ -5520,7 +5625,7 @@ module.exports = (function() { function peg$parsealignat() { var s0, s1, s2; - var key = peg$currPos * 115 + 26, + var key = peg$currPos * 119 + 26, cached = peg$resultsCache[key]; if (cached) { @@ -5535,7 +5640,7 @@ module.exports = (function() { s2 = peg$parsematrix(); if (s2 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c149(s1, s2); + s1 = peg$c150(s1, s2); s0 = s1; } else { peg$currPos = s0; @@ -5554,7 +5659,7 @@ module.exports = (function() { function peg$parsematrix() { var s0, s1, s2, s3, s4; - var key = peg$currPos * 115 + 27, + var key = peg$currPos * 119 + 27, cached = peg$resultsCache[key]; if (cached) { @@ -5572,7 +5677,7 @@ module.exports = (function() { s4 = peg$parsematrix(); if (s4 !== peg$FAILED) { peg$savedPos = s2; - s3 = peg$c150(s1, s4); + s3 = peg$c151(s1, s4); s2 = s3; } else { peg$currPos = s2; @@ -5587,7 +5692,7 @@ module.exports = (function() { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c151(s1, s2); + s1 = peg$c152(s1, s2); s0 = s1; } else { peg$currPos = s0; @@ -5606,7 +5711,7 @@ module.exports = (function() { function peg$parseline_start() { var s0, s1, s2; - var key = peg$currPos * 115 + 28, + var key = peg$currPos * 119 + 28, cached = peg$resultsCache[key]; if (cached) { @@ -5621,7 +5726,7 @@ module.exports = (function() { s2 = peg$parseline_start(); if (s2 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c152(s1, s2); + s1 = peg$c153(s1, s2); s0 = s1; } else { peg$currPos = s0; @@ -5643,7 +5748,7 @@ module.exports = (function() { function peg$parseline() { var s0, s1, s2, s3, s4; - var key = peg$currPos * 115 + 29, + var key = peg$currPos * 119 + 29, cached = peg$resultsCache[key]; if (cached) { @@ -5661,7 +5766,59 @@ module.exports = (function() { s4 = peg$parseline(); if (s4 !== peg$FAILED) { peg$savedPos = s2; - s3 = peg$c153(s1, s4); + s3 = peg$c154(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$c155(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 * 119 + 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$c151(s1, s4); s2 = s3; } else { peg$currPos = s2; @@ -5676,7 +5833,41 @@ module.exports = (function() { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c154(s1, s2); + s1 = peg$c152(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 * 119 + 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$c156(s1, s2); s0 = s1; } else { peg$currPos = s0; @@ -5686,6 +5877,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$c157(s1); + } + s0 = s1; + } peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; @@ -5695,7 +5895,7 @@ module.exports = (function() { function peg$parsecolumn_spec() { var s0, s1, s2, s3, s4; - var key = peg$currPos * 115 + 30, + var key = peg$currPos * 119 + 32, cached = peg$resultsCache[key]; if (cached) { @@ -5720,14 +5920,14 @@ module.exports = (function() { } if (s3 !== peg$FAILED) { peg$savedPos = s2; - s3 = peg$c155(); + s3 = peg$c158(); } s2 = s3; if (s2 !== peg$FAILED) { s3 = peg$parseCURLY_CLOSE(); if (s3 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c156(s2); + s1 = peg$c159(s2); s0 = s1; } else { peg$currPos = s0; @@ -5750,7 +5950,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 * 119 + 33, cached = peg$resultsCache[key]; if (cached) { @@ -5760,12 +5960,12 @@ module.exports = (function() { } s0 = peg$currPos; - if (peg$c157.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$c158); } + if (peg$silentFails === 0) { peg$fail(peg$c161); } } if (s1 !== peg$FAILED) { s2 = peg$parse_(); @@ -5783,11 +5983,11 @@ module.exports = (function() { if (s0 === peg$FAILED) { s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 112) { - s1 = peg$c159; + s1 = peg$c162; peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c160); } + if (peg$silentFails === 0) { peg$fail(peg$c163); } } if (s1 !== peg$FAILED) { s2 = peg$parseCURLY_OPEN(); @@ -5826,32 +6026,32 @@ module.exports = (function() { if (s0 === peg$FAILED) { s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 42) { - s1 = peg$c161; + s1 = peg$c164; peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c162); } + if (peg$silentFails === 0) { peg$fail(peg$c165); } } if (s1 !== peg$FAILED) { s2 = peg$parseCURLY_OPEN(); if (s2 !== peg$FAILED) { s3 = []; - if (peg$c163.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$c164); } + if (peg$silentFails === 0) { peg$fail(peg$c167); } } if (s4 !== peg$FAILED) { while (s4 !== peg$FAILED) { s3.push(s4); - if (peg$c163.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$c164); } + if (peg$silentFails === 0) { peg$fail(peg$c167); } } } } else { @@ -5924,12 +6124,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$c168) { + s1 = peg$c168; peg$currPos += 2; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c166); } + if (peg$silentFails === 0) { peg$fail(peg$c169); } } if (s1 !== peg$FAILED) { s2 = peg$parse_(); @@ -5947,11 +6147,11 @@ module.exports = (function() { if (s0 === peg$FAILED) { s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 124) { - s1 = peg$c167; + s1 = peg$c170; peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c168); } + if (peg$silentFails === 0) { peg$fail(peg$c171); } } if (s1 !== peg$FAILED) { s2 = peg$parse_(); @@ -5969,11 +6169,11 @@ module.exports = (function() { if (s0 === peg$FAILED) { s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 64) { - s1 = peg$c169; + s1 = peg$c172; peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c170); } + if (peg$silentFails === 0) { peg$fail(peg$c173); } } if (s1 !== peg$FAILED) { s2 = peg$parse_(); @@ -6029,7 +6229,7 @@ module.exports = (function() { function peg$parsealignat_spec() { var s0, s1, s2, s3, s4; - var key = peg$currPos * 115 + 32, + var key = peg$currPos * 119 + 34, cached = peg$resultsCache[key]; if (cached) { @@ -6043,22 +6243,22 @@ module.exports = (function() { if (s1 !== peg$FAILED) { s2 = peg$currPos; s3 = []; - if (peg$c163.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$c164); } + if (peg$silentFails === 0) { peg$fail(peg$c167); } } if (s4 !== peg$FAILED) { while (s4 !== peg$FAILED) { s3.push(s4); - if (peg$c163.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$c164); } + if (peg$silentFails === 0) { peg$fail(peg$c167); } } } } else { @@ -6066,7 +6266,7 @@ module.exports = (function() { } if (s3 !== peg$FAILED) { peg$savedPos = s2; - s3 = peg$c155(); + s3 = peg$c158(); } s2 = s3; if (s2 !== peg$FAILED) { @@ -6075,7 +6275,7 @@ module.exports = (function() { s4 = peg$parseCURLY_CLOSE(); if (s4 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c171(s2); + s1 = peg$c174(s2); s0 = s1; } else { peg$currPos = s0; @@ -6102,7 +6302,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 * 119 + 35, cached = peg$resultsCache[key]; if (cached) { @@ -6122,12 +6322,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$c175.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$c176); } } if (s3 !== peg$FAILED) { s4 = peg$parse_(); @@ -6180,7 +6380,7 @@ module.exports = (function() { function peg$parsealpha() { var s0; - var key = peg$currPos * 115 + 34, + var key = peg$currPos * 119 + 36, cached = peg$resultsCache[key]; if (cached) { @@ -6189,12 +6389,12 @@ module.exports = (function() { return cached.result; } - if (peg$c174.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$c175); } + if (peg$silentFails === 0) { peg$fail(peg$c178); } } peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; @@ -6205,7 +6405,7 @@ module.exports = (function() { function peg$parseliteral_id() { var s0; - var key = peg$currPos * 115 + 35, + var key = peg$currPos * 119 + 37, cached = peg$resultsCache[key]; if (cached) { @@ -6214,12 +6414,12 @@ module.exports = (function() { return cached.result; } - if (peg$c174.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$c175); } + if (peg$silentFails === 0) { peg$fail(peg$c178); } } peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; @@ -6230,7 +6430,7 @@ module.exports = (function() { function peg$parseliteral_mn() { var s0; - var key = peg$currPos * 115 + 36, + var key = peg$currPos * 119 + 38, cached = peg$resultsCache[key]; if (cached) { @@ -6239,12 +6439,12 @@ module.exports = (function() { return cached.result; } - if (peg$c163.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$c164); } + if (peg$silentFails === 0) { peg$fail(peg$c167); } } peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; @@ -6255,7 +6455,7 @@ module.exports = (function() { function peg$parseliteral_uf_lt() { var s0; - var key = peg$currPos * 115 + 37, + var key = peg$currPos * 119 + 39, cached = peg$resultsCache[key]; if (cached) { @@ -6264,12 +6464,12 @@ module.exports = (function() { return cached.result; } - if (peg$c176.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$c177); } + if (peg$silentFails === 0) { peg$fail(peg$c180); } } peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; @@ -6280,7 +6480,7 @@ module.exports = (function() { function peg$parsedelimiter_uf_lt() { var s0; - var key = peg$currPos * 115 + 38, + var key = peg$currPos * 119 + 40, cached = peg$resultsCache[key]; if (cached) { @@ -6289,12 +6489,12 @@ module.exports = (function() { return cached.result; } - if (peg$c178.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$c179); } + if (peg$silentFails === 0) { peg$fail(peg$c182); } } peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; @@ -6305,7 +6505,7 @@ module.exports = (function() { function peg$parseliteral_uf_op() { var s0; - var key = peg$currPos * 115 + 39, + var key = peg$currPos * 119 + 41, cached = peg$resultsCache[key]; if (cached) { @@ -6314,12 +6514,12 @@ module.exports = (function() { return cached.result; } - if (peg$c180.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$c181); } + if (peg$silentFails === 0) { peg$fail(peg$c184); } } peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; @@ -6330,7 +6530,7 @@ module.exports = (function() { function peg$parsedelimiter_uf_op() { var s0; - var key = peg$currPos * 115 + 40, + var key = peg$currPos * 119 + 42, cached = peg$resultsCache[key]; if (cached) { @@ -6339,12 +6539,12 @@ module.exports = (function() { return cached.result; } - if (peg$c182.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$c183); } + if (peg$silentFails === 0) { peg$fail(peg$c186); } } peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; @@ -6355,7 +6555,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 * 119 + 43, cached = peg$resultsCache[key]; if (cached) { @@ -6366,60 +6566,60 @@ module.exports = (function() { s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 45) { - s1 = peg$c184; + s1 = peg$c187; peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c185); } + if (peg$silentFails === 0) { peg$fail(peg$c188); } } if (s1 === peg$FAILED) { s1 = null; } if (s1 !== peg$FAILED) { s2 = []; - if (peg$c163.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$c164); } + if (peg$silentFails === 0) { peg$fail(peg$c167); } } while (s3 !== peg$FAILED) { s2.push(s3); - if (peg$c163.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$c164); } + if (peg$silentFails === 0) { peg$fail(peg$c167); } } } if (s2 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 46) { - s3 = peg$c186; + s3 = peg$c189; peg$currPos++; } else { s3 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c187); } + if (peg$silentFails === 0) { peg$fail(peg$c190); } } if (s3 !== peg$FAILED) { s4 = []; - if (peg$c163.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$c164); } + if (peg$silentFails === 0) { peg$fail(peg$c167); } } if (s5 !== peg$FAILED) { while (s5 !== peg$FAILED) { s4.push(s5); - if (peg$c163.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$c164); } + if (peg$silentFails === 0) { peg$fail(peg$c167); } } } } else { @@ -6462,33 +6662,33 @@ module.exports = (function() { if (s0 === peg$FAILED) { s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 45) { - s1 = peg$c184; + s1 = peg$c187; peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c185); } + if (peg$silentFails === 0) { peg$fail(peg$c188); } } if (s1 === peg$FAILED) { s1 = null; } if (s1 !== peg$FAILED) { s2 = []; - if (peg$c163.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$c164); } + if (peg$silentFails === 0) { peg$fail(peg$c167); } } if (s3 !== peg$FAILED) { while (s3 !== peg$FAILED) { s2.push(s3); - if (peg$c163.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$c164); } + if (peg$silentFails === 0) { peg$fail(peg$c167); } } } } else { @@ -6496,11 +6696,11 @@ module.exports = (function() { } if (s2 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 46) { - s3 = peg$c186; + s3 = peg$c189; peg$currPos++; } else { s3 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c187); } + if (peg$silentFails === 0) { peg$fail(peg$c190); } } if (s3 === peg$FAILED) { s3 = null; @@ -6545,7 +6745,7 @@ module.exports = (function() { function peg$parsespce() { var s0; - var key = peg$currPos * 115 + 42, + var key = peg$currPos * 119 + 44, cached = peg$resultsCache[key]; if (cached) { @@ -6554,108 +6754,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$c191) { + s0 = peg$c191; peg$currPos += 2; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c189); } + if (peg$silentFails === 0) { peg$fail(peg$c192); } } if (s0 === peg$FAILED) { - if (input.substr(peg$currPos, 2) === peg$c190) { - s0 = peg$c190; + 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$c191); } + if (peg$silentFails === 0) { peg$fail(peg$c194); } } if (s0 === peg$FAILED) { - if (input.substr(peg$currPos, 2) === peg$c192) { - s0 = peg$c192; + 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$c193); } + if (peg$silentFails === 0) { peg$fail(peg$c196); } } if (s0 === peg$FAILED) { - if (input.substr(peg$currPos, 2) === peg$c194) { - s0 = peg$c194; + 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$c195); } + if (peg$silentFails === 0) { peg$fail(peg$c198); } } if (s0 === peg$FAILED) { - if (input.substr(peg$currPos, 2) === peg$c196) { - s0 = peg$c196; + 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$c197); } + if (peg$silentFails === 0) { peg$fail(peg$c200); } } if (s0 === peg$FAILED) { - if (input.substr(peg$currPos, 2) === peg$c198) { - s0 = peg$c198; + 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$c199); } + if (peg$silentFails === 0) { peg$fail(peg$c202); } } if (s0 === peg$FAILED) { - if (input.substr(peg$currPos, 2) === peg$c200) { - s0 = peg$c200; + 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$c201); } + if (peg$silentFails === 0) { peg$fail(peg$c204); } } if (s0 === peg$FAILED) { - if (input.substr(peg$currPos, 2) === peg$c202) { - s0 = peg$c202; + 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$c203); } + if (peg$silentFails === 0) { peg$fail(peg$c206); } } if (s0 === peg$FAILED) { - if (input.substr(peg$currPos, 2) === peg$c204) { - s0 = peg$c204; + 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$c205); } + if (peg$silentFails === 0) { peg$fail(peg$c208); } } if (s0 === peg$FAILED) { - if (input.substr(peg$currPos, 2) === peg$c206) { - s0 = peg$c206; + 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$c207); } + if (peg$silentFails === 0) { peg$fail(peg$c210); } } if (s0 === peg$FAILED) { - if (input.substr(peg$currPos, 2) === peg$c208) { - s0 = peg$c208; + 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$c209); } + if (peg$silentFails === 0) { peg$fail(peg$c212); } } if (s0 === peg$FAILED) { - if (input.substr(peg$currPos, 2) === peg$c210) { - s0 = peg$c210; + 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$c211); } + if (peg$silentFails === 0) { peg$fail(peg$c214); } } if (s0 === peg$FAILED) { - if (input.substr(peg$currPos, 2) === peg$c212) { - s0 = peg$c212; + 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$c213); } + if (peg$silentFails === 0) { peg$fail(peg$c216); } } } } @@ -6678,7 +6878,7 @@ module.exports = (function() { function peg$parseatsymbol() { var s0; - var key = peg$currPos * 115 + 43, + var key = peg$currPos * 119 + 45, cached = peg$resultsCache[key]; if (cached) { @@ -6687,12 +6887,12 @@ module.exports = (function() { return cached.result; } - if (peg$c214.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$c215); } + if (peg$silentFails === 0) { peg$fail(peg$c218); } } peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; @@ -6703,7 +6903,7 @@ module.exports = (function() { function peg$parseboxchars() { var s0, s1, s2; - var key = peg$currPos * 115 + 44, + var key = peg$currPos * 119 + 46, cached = peg$resultsCache[key]; if (cached) { @@ -6712,33 +6912,33 @@ module.exports = (function() { return cached.result; } - if (peg$c216.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$c217); } + if (peg$silentFails === 0) { peg$fail(peg$c220); } } if (s0 === peg$FAILED) { s0 = peg$currPos; - if (peg$c218.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$c219); } + if (peg$silentFails === 0) { peg$fail(peg$c222); } } if (s1 !== peg$FAILED) { - if (peg$c220.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$c221); } + if (peg$silentFails === 0) { peg$fail(peg$c224); } } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c222(s1, s2); + s1 = peg$c225(s1, s2); s0 = s1; } else { peg$currPos = s0; @@ -6758,7 +6958,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 * 119 + 47, cached = peg$resultsCache[key]; if (cached) { @@ -6771,7 +6971,7 @@ module.exports = (function() { s1 = peg$parsegeneric_func(); if (s1 !== peg$FAILED) { peg$savedPos = peg$currPos; - s2 = peg$c223(s1); + s2 = peg$c226(s1); if (s2) { s2 = void 0; } else { @@ -6810,7 +7010,7 @@ module.exports = (function() { s7 = peg$parse_(); if (s7 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c224(s1, s5); + s1 = peg$c227(s1, s5); s0 = s1; } else { peg$currPos = s0; @@ -6849,7 +7049,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 * 119 + 48, cached = peg$resultsCache[key]; if (cached) { @@ -6866,11 +7066,11 @@ module.exports = (function() { s1 = peg$parseliteral_uf_lt(); if (s1 === peg$FAILED) { if (input.charCodeAt(peg$currPos) === 45) { - s1 = peg$c184; + s1 = peg$c187; peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c185); } + if (peg$silentFails === 0) { peg$fail(peg$c188); } } if (s1 === peg$FAILED) { s1 = peg$parseliteral_uf_op(); @@ -6882,7 +7082,7 @@ module.exports = (function() { s2 = peg$parse_(); if (s2 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c225(s1); + s1 = peg$c228(s1); s0 = s1; } else { peg$currPos = s0; @@ -6897,7 +7097,7 @@ module.exports = (function() { s1 = peg$parsegeneric_func(); if (s1 !== peg$FAILED) { peg$savedPos = peg$currPos; - s2 = peg$c226(s1); + s2 = peg$c229(s1); if (s2) { s2 = void 0; } else { @@ -6907,11 +7107,11 @@ module.exports = (function() { s3 = peg$parse_(); if (s3 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 40) { - s4 = peg$c227; + s4 = peg$c230; peg$currPos++; } else { s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c228); } + if (peg$silentFails === 0) { peg$fail(peg$c231); } } if (s4 === peg$FAILED) { if (input.charCodeAt(peg$currPos) === 91) { @@ -6922,19 +7122,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$c232) { + s4 = peg$c232; peg$currPos += 2; } else { s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c230); } + 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$c231(s1); + s5 = peg$c234(s1); } s4 = s5; } @@ -6944,7 +7144,7 @@ module.exports = (function() { s5 = peg$parse_(); if (s5 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c232(s1, s4); + s1 = peg$c235(s1, s4); s0 = s1; } else { peg$currPos = s0; @@ -6971,7 +7171,7 @@ module.exports = (function() { s1 = peg$parsegeneric_func(); if (s1 !== peg$FAILED) { peg$savedPos = peg$currPos; - s2 = peg$c233(s1); + s2 = peg$c236(s1); if (s2) { s2 = void 0; } else { @@ -6981,11 +7181,11 @@ module.exports = (function() { s3 = peg$parse_(); if (s3 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 40) { - s4 = peg$c227; + s4 = peg$c230; peg$currPos++; } else { s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c228); } + if (peg$silentFails === 0) { peg$fail(peg$c231); } } if (s4 === peg$FAILED) { if (input.charCodeAt(peg$currPos) === 91) { @@ -6996,19 +7196,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$c232) { + s4 = peg$c232; peg$currPos += 2; } else { s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c230); } + 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$c234(s1); + s5 = peg$c237(s1); } s4 = s5; } @@ -7018,7 +7218,7 @@ module.exports = (function() { s5 = peg$parse_(); if (s5 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c235(s1, s4); + s1 = peg$c238(s1, s4); s0 = s1; } else { peg$currPos = s0; @@ -7045,7 +7245,7 @@ module.exports = (function() { s1 = peg$parsegeneric_func(); if (s1 !== peg$FAILED) { peg$savedPos = peg$currPos; - s2 = peg$c236(s1); + s2 = peg$c239(s1); if (s2) { s2 = void 0; } else { @@ -7055,7 +7255,7 @@ module.exports = (function() { s3 = peg$parse_(); if (s3 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c237(s1); + s1 = peg$c240(s1); s0 = s1; } else { peg$currPos = s0; @@ -7074,7 +7274,7 @@ module.exports = (function() { s1 = peg$parsegeneric_func(); if (s1 !== peg$FAILED) { peg$savedPos = peg$currPos; - s2 = peg$c238(s1); + s2 = peg$c241(s1); if (s2) { s2 = void 0; } else { @@ -7084,7 +7284,7 @@ module.exports = (function() { s3 = peg$parse_(); if (s3 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c239(s1); + s1 = peg$c242(s1); s0 = s1; } else { peg$currPos = s0; @@ -7103,7 +7303,7 @@ module.exports = (function() { s1 = peg$parsegeneric_func(); if (s1 !== peg$FAILED) { peg$savedPos = peg$currPos; - s2 = peg$c240(s1); + s2 = peg$c243(s1); if (s2) { s2 = void 0; } else { @@ -7123,7 +7323,7 @@ module.exports = (function() { s5 = peg$parsegeneric_func(); if (s5 !== peg$FAILED) { peg$savedPos = peg$currPos; - s6 = peg$c241(s1, s5); + s6 = peg$c244(s1, s5); if (s6) { s6 = void 0; } else { @@ -7143,7 +7343,7 @@ module.exports = (function() { s9 = peg$parse_(); if (s9 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c242(s1, s5); + s1 = peg$c245(s1, s5); s0 = s1; } else { peg$currPos = s0; @@ -7186,7 +7386,7 @@ module.exports = (function() { s1 = peg$parsegeneric_func(); if (s1 !== peg$FAILED) { peg$savedPos = peg$currPos; - s2 = peg$c243(s1); + s2 = peg$c246(s1); if (s2) { s2 = void 0; } else { @@ -7196,7 +7396,7 @@ module.exports = (function() { s3 = peg$parse_(); if (s3 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c244(s1); + s1 = peg$c247(s1); s0 = s1; } else { peg$currPos = s0; @@ -7215,7 +7415,7 @@ module.exports = (function() { s1 = peg$parsegeneric_func(); if (s1 !== peg$FAILED) { peg$savedPos = peg$currPos; - s2 = peg$c245(s1); + s2 = peg$c248(s1); if (s2) { s2 = void 0; } else { @@ -7235,7 +7435,7 @@ module.exports = (function() { s5 = peg$parsegeneric_func(); if (s5 !== peg$FAILED) { peg$savedPos = peg$currPos; - s6 = peg$c246(s1, s5); + s6 = peg$c249(s1, s5); if (s6) { s6 = void 0; } else { @@ -7255,7 +7455,7 @@ module.exports = (function() { s9 = peg$parse_(); if (s9 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c247(s1, s5); + s1 = peg$c250(s1, s5); s0 = s1; } else { peg$currPos = s0; @@ -7301,31 +7501,31 @@ module.exports = (function() { } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c248(s1); + s1 = peg$c251(s1); } s0 = s1; if (s0 === peg$FAILED) { s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 92) { - s1 = peg$c249; + s1 = peg$c252; peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c250); } + if (peg$silentFails === 0) { peg$fail(peg$c253); } } if (s1 !== peg$FAILED) { - if (peg$c251.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$c252); } + if (peg$silentFails === 0) { peg$fail(peg$c255); } } if (s2 !== peg$FAILED) { s3 = peg$parse_(); if (s3 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c253(s2); + s1 = peg$c256(s2); s0 = s1; } else { peg$currPos = s0; @@ -7341,18 +7541,18 @@ module.exports = (function() { } if (s0 === peg$FAILED) { s0 = peg$currPos; - if (peg$c254.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$c255); } + if (peg$silentFails === 0) { peg$fail(peg$c258); } } if (s1 !== peg$FAILED) { s2 = peg$parse_(); if (s2 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c225(s1); + s1 = peg$c228(s1); s0 = s1; } else { peg$currPos = s0; @@ -7364,18 +7564,18 @@ module.exports = (function() { } if (s0 === peg$FAILED) { s0 = peg$currPos; - if (peg$c256.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$c257); } + if (peg$silentFails === 0) { peg$fail(peg$c260); } } if (s1 !== peg$FAILED) { s2 = peg$parse_(); if (s2 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c258(s1); + s1 = peg$c261(s1); s0 = s1; } else { peg$currPos = s0; @@ -7405,7 +7605,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 * 119 + 49, cached = peg$resultsCache[key]; if (cached) { @@ -7418,7 +7618,7 @@ module.exports = (function() { s1 = peg$parsegeneric_func(); if (s1 !== peg$FAILED) { peg$savedPos = peg$currPos; - s2 = peg$c226(s1); + s2 = peg$c229(s1); if (s2) { s2 = void 0; } else { @@ -7428,11 +7628,11 @@ module.exports = (function() { s3 = peg$parse_(); if (s3 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 40) { - s4 = peg$c227; + s4 = peg$c230; peg$currPos++; } else { s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c228); } + if (peg$silentFails === 0) { peg$fail(peg$c231); } } if (s4 === peg$FAILED) { if (input.charCodeAt(peg$currPos) === 91) { @@ -7443,19 +7643,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$c232) { + s4 = peg$c232; peg$currPos += 2; } else { s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c230); } + 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$c231(s1); + s5 = peg$c234(s1); } s4 = s5; } @@ -7465,7 +7665,7 @@ module.exports = (function() { s5 = peg$parse_(); if (s5 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c232(s1, s4); + s1 = peg$c235(s1, s4); s0 = s1; } else { peg$currPos = s0; @@ -7492,7 +7692,7 @@ module.exports = (function() { s1 = peg$parsegeneric_func(); if (s1 !== peg$FAILED) { peg$savedPos = peg$currPos; - s2 = peg$c233(s1); + s2 = peg$c236(s1); if (s2) { s2 = void 0; } else { @@ -7502,11 +7702,11 @@ module.exports = (function() { s3 = peg$parse_(); if (s3 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 40) { - s4 = peg$c227; + s4 = peg$c230; peg$currPos++; } else { s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c228); } + if (peg$silentFails === 0) { peg$fail(peg$c231); } } if (s4 === peg$FAILED) { if (input.charCodeAt(peg$currPos) === 91) { @@ -7517,19 +7717,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$c232) { + s4 = peg$c232; peg$currPos += 2; } else { s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c230); } + 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$c234(s1); + s5 = peg$c237(s1); } s4 = s5; } @@ -7539,7 +7739,7 @@ module.exports = (function() { s5 = peg$parse_(); if (s5 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c235(s1, s4); + s1 = peg$c238(s1, s4); s0 = s1; } else { peg$currPos = s0; @@ -7566,7 +7766,7 @@ module.exports = (function() { s1 = peg$parsegeneric_func(); if (s1 !== peg$FAILED) { peg$savedPos = peg$currPos; - s2 = peg$c236(s1); + s2 = peg$c239(s1); if (s2) { s2 = void 0; } else { @@ -7576,7 +7776,7 @@ module.exports = (function() { s3 = peg$parse_(); if (s3 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c237(s1); + s1 = peg$c240(s1); s0 = s1; } else { peg$currPos = s0; @@ -7595,7 +7795,7 @@ module.exports = (function() { s1 = peg$parsegeneric_func(); if (s1 !== peg$FAILED) { peg$savedPos = peg$currPos; - s2 = peg$c243(s1); + s2 = peg$c246(s1); if (s2) { s2 = void 0; } else { @@ -7605,7 +7805,7 @@ module.exports = (function() { s3 = peg$parse_(); if (s3 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c244(s1); + s1 = peg$c247(s1); s0 = s1; } else { peg$currPos = s0; @@ -7624,7 +7824,7 @@ module.exports = (function() { s1 = peg$parsegeneric_func(); if (s1 !== peg$FAILED) { peg$savedPos = peg$currPos; - s2 = peg$c245(s1); + s2 = peg$c248(s1); if (s2) { s2 = void 0; } else { @@ -7644,7 +7844,7 @@ module.exports = (function() { s5 = peg$parsegeneric_func(); if (s5 !== peg$FAILED) { peg$savedPos = peg$currPos; - s6 = peg$c246(s1, s5); + s6 = peg$c249(s1, s5); if (s6) { s6 = void 0; } else { @@ -7664,7 +7864,7 @@ module.exports = (function() { s9 = peg$parse_(); if (s9 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c247(s1, s5); + s1 = peg$c250(s1, s5); s0 = s1; } else { peg$currPos = s0; @@ -7717,7 +7917,7 @@ module.exports = (function() { s3 = peg$parse_(); if (s3 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c259(s1); + s1 = peg$c262(s1); s0 = s1; } else { peg$currPos = s0; @@ -7739,31 +7939,31 @@ module.exports = (function() { } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c248(s1); + s1 = peg$c251(s1); } s0 = s1; if (s0 === peg$FAILED) { s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 92) { - s1 = peg$c249; + s1 = peg$c252; peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c250); } + if (peg$silentFails === 0) { peg$fail(peg$c253); } } if (s1 !== peg$FAILED) { - if (peg$c251.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$c252); } + if (peg$silentFails === 0) { peg$fail(peg$c255); } } if (s2 !== peg$FAILED) { s3 = peg$parse_(); if (s3 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c253(s2); + s1 = peg$c256(s2); s0 = s1; } else { peg$currPos = s0; @@ -7779,18 +7979,18 @@ module.exports = (function() { } if (s0 === peg$FAILED) { s0 = peg$currPos; - if (peg$c254.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$c255); } + if (peg$silentFails === 0) { peg$fail(peg$c258); } } if (s1 !== peg$FAILED) { s2 = peg$parse_(); if (s2 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c225(s1); + s1 = peg$c228(s1); s0 = s1; } else { peg$currPos = s0; @@ -7802,18 +8002,18 @@ module.exports = (function() { } if (s0 === peg$FAILED) { s0 = peg$currPos; - if (peg$c256.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$c257); } + if (peg$silentFails === 0) { peg$fail(peg$c260); } } if (s1 !== peg$FAILED) { s2 = peg$parse_(); if (s2 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c258(s1); + s1 = peg$c261(s1); s0 = s1; } else { peg$currPos = s0; @@ -7841,7 +8041,7 @@ module.exports = (function() { function peg$parseDELIMITER() { var s0, s1, s2, s3; - var key = peg$currPos * 115 + 48, + var key = peg$currPos * 119 + 50, cached = peg$resultsCache[key]; if (cached) { @@ -7868,7 +8068,7 @@ module.exports = (function() { s2 = peg$parse_(); if (s2 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c225(s1); + s1 = peg$c228(s1); s0 = s1; } else { peg$currPos = s0; @@ -7881,25 +8081,25 @@ module.exports = (function() { if (s0 === peg$FAILED) { s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 92) { - s1 = peg$c249; + s1 = peg$c252; peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c250); } + if (peg$silentFails === 0) { peg$fail(peg$c253); } } if (s1 !== peg$FAILED) { - if (peg$c260.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$c261); } + if (peg$silentFails === 0) { peg$fail(peg$c264); } } if (s2 !== peg$FAILED) { s3 = peg$parse_(); if (s3 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c253(s2); + s1 = peg$c256(s2); s0 = s1; } else { peg$currPos = s0; @@ -7918,7 +8118,7 @@ module.exports = (function() { s1 = peg$parsegeneric_func(); if (s1 !== peg$FAILED) { peg$savedPos = peg$currPos; - s2 = peg$c262(s1); + s2 = peg$c265(s1); if (s2) { s2 = void 0; } else { @@ -7928,7 +8128,7 @@ module.exports = (function() { s3 = peg$parse_(); if (s3 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c237(s1); + s1 = peg$c240(s1); s0 = s1; } else { peg$currPos = s0; @@ -7947,7 +8147,7 @@ module.exports = (function() { s1 = peg$parsegeneric_func(); if (s1 !== peg$FAILED) { peg$savedPos = peg$currPos; - s2 = peg$c263(s1); + s2 = peg$c266(s1); if (s2) { s2 = void 0; } else { @@ -7957,7 +8157,7 @@ module.exports = (function() { s3 = peg$parse_(); if (s3 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c264(s1); + s1 = peg$c267(s1); s0 = s1; } else { peg$currPos = s0; @@ -7978,7 +8178,7 @@ module.exports = (function() { s2 = peg$parse_(); if (s2 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c265(s1); + s1 = peg$c268(s1); s0 = s1; } else { peg$currPos = s0; @@ -8001,7 +8201,7 @@ module.exports = (function() { function peg$parseFUN_AR1nb() { var s0, s1, s2, s3, s4; - var key = peg$currPos * 115 + 49, + var key = peg$currPos * 119 + 51, cached = peg$resultsCache[key]; if (cached) { @@ -8014,7 +8214,7 @@ module.exports = (function() { s1 = peg$parsegeneric_func(); if (s1 !== peg$FAILED) { peg$savedPos = peg$currPos; - s2 = peg$c266(s1); + s2 = peg$c269(s1); if (s2) { s2 = void 0; } else { @@ -8029,7 +8229,7 @@ module.exports = (function() { } if (s3 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c267(s1); + s1 = peg$c270(s1); s0 = s1; } else { peg$currPos = s0; @@ -8052,7 +8252,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 * 119 + 52, cached = peg$resultsCache[key]; if (cached) { @@ -8065,7 +8265,7 @@ module.exports = (function() { s1 = peg$parsegeneric_func(); if (s1 !== peg$FAILED) { peg$savedPos = peg$currPos; - s2 = peg$c268(s1); + s2 = peg$c271(s1); if (s2) { s2 = void 0; } else { @@ -8095,7 +8295,7 @@ module.exports = (function() { } if (s5 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c267(s1); + s1 = peg$c270(s1); s0 = s1; } else { peg$currPos = s0; @@ -8126,7 +8326,7 @@ module.exports = (function() { function peg$parseNEXT_CELL() { var s0, s1, s2; - var key = peg$currPos * 115 + 51, + var key = peg$currPos * 119 + 53, cached = peg$resultsCache[key]; if (cached) { @@ -8137,11 +8337,11 @@ module.exports = (function() { s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 38) { - s1 = peg$c269; + s1 = peg$c272; peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c270); } + if (peg$silentFails === 0) { peg$fail(peg$c273); } } if (s1 !== peg$FAILED) { s2 = peg$parse_(); @@ -8165,7 +8365,7 @@ module.exports = (function() { function peg$parseNEXT_ROW() { var s0, s1, s2; - var key = peg$currPos * 115 + 52, + var key = peg$currPos * 119 + 54, cached = peg$resultsCache[key]; if (cached) { @@ -8175,12 +8375,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$c274) { + s1 = peg$c274; peg$currPos += 2; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c272); } + if (peg$silentFails === 0) { peg$fail(peg$c275); } } if (s1 !== peg$FAILED) { s2 = peg$parse_(); @@ -8204,7 +8404,7 @@ module.exports = (function() { function peg$parseBEGIN() { var s0, s1, s2; - var key = peg$currPos * 115 + 53, + var key = peg$currPos * 119 + 55, cached = peg$resultsCache[key]; if (cached) { @@ -8214,12 +8414,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$c276) { + s1 = peg$c276; peg$currPos += 6; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c274); } + if (peg$silentFails === 0) { peg$fail(peg$c277); } } if (s1 !== peg$FAILED) { s2 = peg$parse_(); @@ -8243,7 +8443,7 @@ module.exports = (function() { function peg$parseEND() { var s0, s1, s2; - var key = peg$currPos * 115 + 54, + var key = peg$currPos * 119 + 56, cached = peg$resultsCache[key]; if (cached) { @@ -8253,12 +8453,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$c278) { + s1 = peg$c278; peg$currPos += 4; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c276); } + if (peg$silentFails === 0) { peg$fail(peg$c279); } } if (s1 !== peg$FAILED) { s2 = peg$parse_(); @@ -8282,7 +8482,7 @@ module.exports = (function() { function peg$parseBEGIN_MATRIX() { var s0, s1, s2, s3; - var key = peg$currPos * 115 + 55, + var key = peg$currPos * 119 + 57, cached = peg$resultsCache[key]; if (cached) { @@ -8294,12 +8494,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$c280) { + s2 = peg$c280; peg$currPos += 8; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c278); } + if (peg$silentFails === 0) { peg$fail(peg$c281); } } if (s2 !== peg$FAILED) { s3 = peg$parse_(); @@ -8327,7 +8527,7 @@ module.exports = (function() { function peg$parseEND_MATRIX() { var s0, s1, s2, s3; - var key = peg$currPos * 115 + 56, + var key = peg$currPos * 119 + 58, cached = peg$resultsCache[key]; if (cached) { @@ -8339,12 +8539,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$c280) { + s2 = peg$c280; peg$currPos += 8; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c278); } + if (peg$silentFails === 0) { peg$fail(peg$c281); } } if (s2 !== peg$FAILED) { s3 = peg$parse_(); @@ -8372,7 +8572,7 @@ module.exports = (function() { function peg$parseBEGIN_PMATRIX() { var s0, s1, s2, s3; - var key = peg$currPos * 115 + 57, + var key = peg$currPos * 119 + 59, cached = peg$resultsCache[key]; if (cached) { @@ -8384,12 +8584,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$c282) { + s2 = peg$c282; peg$currPos += 9; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c280); } + if (peg$silentFails === 0) { peg$fail(peg$c283); } } if (s2 !== peg$FAILED) { s3 = peg$parse_(); @@ -8417,7 +8617,7 @@ module.exports = (function() { function peg$parseEND_PMATRIX() { var s0, s1, s2, s3; - var key = peg$currPos * 115 + 58, + var key = peg$currPos * 119 + 60, cached = peg$resultsCache[key]; if (cached) { @@ -8429,12 +8629,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$c282) { + s2 = peg$c282; peg$currPos += 9; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c280); } + if (peg$silentFails === 0) { peg$fail(peg$c283); } } if (s2 !== peg$FAILED) { s3 = peg$parse_(); @@ -8462,7 +8662,7 @@ module.exports = (function() { function peg$parseBEGIN_BMATRIX() { var s0, s1, s2, s3; - var key = peg$currPos * 115 + 59, + var key = peg$currPos * 119 + 61, cached = peg$resultsCache[key]; if (cached) { @@ -8474,12 +8674,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$c284) { + s2 = peg$c284; peg$currPos += 9; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c282); } + if (peg$silentFails === 0) { peg$fail(peg$c285); } } if (s2 !== peg$FAILED) { s3 = peg$parse_(); @@ -8507,7 +8707,7 @@ module.exports = (function() { function peg$parseEND_BMATRIX() { var s0, s1, s2, s3; - var key = peg$currPos * 115 + 60, + var key = peg$currPos * 119 + 62, cached = peg$resultsCache[key]; if (cached) { @@ -8519,12 +8719,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$c284) { + s2 = peg$c284; peg$currPos += 9; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c282); } + if (peg$silentFails === 0) { peg$fail(peg$c285); } } if (s2 !== peg$FAILED) { s3 = peg$parse_(); @@ -8552,7 +8752,7 @@ module.exports = (function() { function peg$parseBEGIN_BBMATRIX() { var s0, s1, s2, s3; - var key = peg$currPos * 115 + 61, + var key = peg$currPos * 119 + 63, cached = peg$resultsCache[key]; if (cached) { @@ -8564,12 +8764,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$c286) { + s2 = peg$c286; peg$currPos += 9; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c284); } + if (peg$silentFails === 0) { peg$fail(peg$c287); } } if (s2 !== peg$FAILED) { s3 = peg$parse_(); @@ -8597,7 +8797,7 @@ module.exports = (function() { function peg$parseEND_BBMATRIX() { var s0, s1, s2, s3; - var key = peg$currPos * 115 + 62, + var key = peg$currPos * 119 + 64, cached = peg$resultsCache[key]; if (cached) { @@ -8609,12 +8809,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$c286) { + s2 = peg$c286; peg$currPos += 9; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c284); } + if (peg$silentFails === 0) { peg$fail(peg$c287); } } if (s2 !== peg$FAILED) { s3 = peg$parse_(); @@ -8642,7 +8842,7 @@ module.exports = (function() { function peg$parseBEGIN_VMATRIX() { var s0, s1, s2, s3; - var key = peg$currPos * 115 + 63, + var key = peg$currPos * 119 + 65, cached = peg$resultsCache[key]; if (cached) { @@ -8654,12 +8854,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$c288) { + s2 = peg$c288; peg$currPos += 9; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c286); } + if (peg$silentFails === 0) { peg$fail(peg$c289); } } if (s2 !== peg$FAILED) { s3 = peg$parse_(); @@ -8687,7 +8887,7 @@ module.exports = (function() { function peg$parseEND_VMATRIX() { var s0, s1, s2, s3; - var key = peg$currPos * 115 + 64, + var key = peg$currPos * 119 + 66, cached = peg$resultsCache[key]; if (cached) { @@ -8699,12 +8899,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$c288) { + s2 = peg$c288; peg$currPos += 9; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c286); } + if (peg$silentFails === 0) { peg$fail(peg$c289); } } if (s2 !== peg$FAILED) { s3 = peg$parse_(); @@ -8732,7 +8932,7 @@ module.exports = (function() { function peg$parseBEGIN_VVMATRIX() { var s0, s1, s2, s3; - var key = peg$currPos * 115 + 65, + var key = peg$currPos * 119 + 67, cached = peg$resultsCache[key]; if (cached) { @@ -8744,12 +8944,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$c290) { + s2 = peg$c290; peg$currPos += 9; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c288); } + if (peg$silentFails === 0) { peg$fail(peg$c291); } } if (s2 !== peg$FAILED) { s3 = peg$parse_(); @@ -8777,7 +8977,7 @@ module.exports = (function() { function peg$parseEND_VVMATRIX() { var s0, s1, s2, s3; - var key = peg$currPos * 115 + 66, + var key = peg$currPos * 119 + 68, cached = peg$resultsCache[key]; if (cached) { @@ -8789,12 +8989,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$c290) { + s2 = peg$c290; peg$currPos += 9; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c288); } + if (peg$silentFails === 0) { peg$fail(peg$c291); } } if (s2 !== peg$FAILED) { s3 = peg$parse_(); @@ -8822,7 +9022,7 @@ module.exports = (function() { function peg$parseBEGIN_ARRAY() { var s0, s1, s2, s3; - var key = peg$currPos * 115 + 67, + var key = peg$currPos * 119 + 69, cached = peg$resultsCache[key]; if (cached) { @@ -8834,12 +9034,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$c292) { + s2 = peg$c292; peg$currPos += 7; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c290); } + if (peg$silentFails === 0) { peg$fail(peg$c293); } } if (s2 !== peg$FAILED) { s3 = peg$parse_(); @@ -8867,7 +9067,7 @@ module.exports = (function() { function peg$parseEND_ARRAY() { var s0, s1, s2, s3; - var key = peg$currPos * 115 + 68, + var key = peg$currPos * 119 + 70, cached = peg$resultsCache[key]; if (cached) { @@ -8879,12 +9079,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$c292) { + s2 = peg$c292; peg$currPos += 7; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c290); } + if (peg$silentFails === 0) { peg$fail(peg$c293); } } if (s2 !== peg$FAILED) { s3 = peg$parse_(); @@ -8912,7 +9112,7 @@ module.exports = (function() { function peg$parseBEGIN_ALIGN() { var s0, s1, s2, s3; - var key = peg$currPos * 115 + 69, + var key = peg$currPos * 119 + 71, cached = peg$resultsCache[key]; if (cached) { @@ -8924,12 +9124,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$c294) { + s2 = peg$c294; peg$currPos += 7; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c292); } + if (peg$silentFails === 0) { peg$fail(peg$c295); } } if (s2 !== peg$FAILED) { s3 = peg$parse_(); @@ -8957,7 +9157,7 @@ module.exports = (function() { function peg$parseEND_ALIGN() { var s0, s1, s2, s3; - var key = peg$currPos * 115 + 70, + var key = peg$currPos * 119 + 72, cached = peg$resultsCache[key]; if (cached) { @@ -8969,12 +9169,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$c294) { + s2 = peg$c294; peg$currPos += 7; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c292); } + if (peg$silentFails === 0) { peg$fail(peg$c295); } } if (s2 !== peg$FAILED) { s3 = peg$parse_(); @@ -9002,7 +9202,7 @@ module.exports = (function() { function peg$parseBEGIN_ALIGNED() { var s0, s1, s2, s3; - var key = peg$currPos * 115 + 71, + var key = peg$currPos * 119 + 73, cached = peg$resultsCache[key]; if (cached) { @@ -9014,12 +9214,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$c296) { + s2 = peg$c296; peg$currPos += 9; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c294); } + if (peg$silentFails === 0) { peg$fail(peg$c297); } } if (s2 !== peg$FAILED) { s3 = peg$parse_(); @@ -9047,7 +9247,7 @@ module.exports = (function() { function peg$parseEND_ALIGNED() { var s0, s1, s2, s3; - var key = peg$currPos * 115 + 72, + var key = peg$currPos * 119 + 74, cached = peg$resultsCache[key]; if (cached) { @@ -9059,12 +9259,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$c296) { + s2 = peg$c296; peg$currPos += 9; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c294); } + if (peg$silentFails === 0) { peg$fail(peg$c297); } } if (s2 !== peg$FAILED) { s3 = peg$parse_(); @@ -9092,7 +9292,7 @@ module.exports = (function() { function peg$parseBEGIN_ALIGNAT() { var s0, s1, s2, s3; - var key = peg$currPos * 115 + 73, + var key = peg$currPos * 119 + 75, cached = peg$resultsCache[key]; if (cached) { @@ -9104,12 +9304,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$c298) { + s2 = peg$c298; peg$currPos += 9; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c296); } + if (peg$silentFails === 0) { peg$fail(peg$c299); } } if (s2 !== peg$FAILED) { s3 = peg$parse_(); @@ -9137,7 +9337,7 @@ module.exports = (function() { function peg$parseEND_ALIGNAT() { var s0, s1, s2, s3; - var key = peg$currPos * 115 + 74, + var key = peg$currPos * 119 + 76, cached = peg$resultsCache[key]; if (cached) { @@ -9149,12 +9349,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$c298) { + s2 = peg$c298; peg$currPos += 9; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c296); } + if (peg$silentFails === 0) { peg$fail(peg$c299); } } if (s2 !== peg$FAILED) { s3 = peg$parse_(); @@ -9182,7 +9382,7 @@ module.exports = (function() { function peg$parseBEGIN_ALIGNEDAT() { var s0, s1, s2, s3; - var key = peg$currPos * 115 + 75, + var key = peg$currPos * 119 + 77, cached = peg$resultsCache[key]; if (cached) { @@ -9194,12 +9394,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$c300) { + s2 = peg$c300; peg$currPos += 11; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c298); } + if (peg$silentFails === 0) { peg$fail(peg$c301); } } if (s2 !== peg$FAILED) { s3 = peg$parse_(); @@ -9227,7 +9427,7 @@ module.exports = (function() { function peg$parseEND_ALIGNEDAT() { var s0, s1, s2, s3; - var key = peg$currPos * 115 + 76, + var key = peg$currPos * 119 + 78, cached = peg$resultsCache[key]; if (cached) { @@ -9239,12 +9439,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$c300) { + s2 = peg$c300; peg$currPos += 11; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c298); } + if (peg$silentFails === 0) { peg$fail(peg$c301); } } if (s2 !== peg$FAILED) { s3 = peg$parse_(); @@ -9272,7 +9472,7 @@ module.exports = (function() { function peg$parseBEGIN_SMALLMATRIX() { var s0, s1, s2, s3; - var key = peg$currPos * 115 + 77, + var key = peg$currPos * 119 + 79, cached = peg$resultsCache[key]; if (cached) { @@ -9284,12 +9484,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$c302) { + s2 = peg$c302; peg$currPos += 13; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c300); } + if (peg$silentFails === 0) { peg$fail(peg$c303); } } if (s2 !== peg$FAILED) { s3 = peg$parse_(); @@ -9317,7 +9517,7 @@ module.exports = (function() { function peg$parseEND_SMALLMATRIX() { var s0, s1, s2, s3; - var key = peg$currPos * 115 + 78, + var key = peg$currPos * 119 + 80, cached = peg$resultsCache[key]; if (cached) { @@ -9329,12 +9529,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$c302) { + s2 = peg$c302; peg$currPos += 13; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c300); } + if (peg$silentFails === 0) { peg$fail(peg$c303); } } if (s2 !== peg$FAILED) { s3 = peg$parse_(); @@ -9362,7 +9562,7 @@ module.exports = (function() { function peg$parseBEGIN_CASES() { var s0, s1, s2, s3; - var key = peg$currPos * 115 + 79, + var key = peg$currPos * 119 + 81, cached = peg$resultsCache[key]; if (cached) { @@ -9374,12 +9574,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$c304) { + s2 = peg$c304; peg$currPos += 7; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c302); } + if (peg$silentFails === 0) { peg$fail(peg$c305); } } if (s2 !== peg$FAILED) { s3 = peg$parse_(); @@ -9407,7 +9607,7 @@ module.exports = (function() { function peg$parseEND_CASES() { var s0, s1, s2, s3; - var key = peg$currPos * 115 + 80, + var key = peg$currPos * 119 + 82, cached = peg$resultsCache[key]; if (cached) { @@ -9419,12 +9619,102 @@ 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$c304) { + s2 = peg$c304; peg$currPos += 7; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c302); } + if (peg$silentFails === 0) { peg$fail(peg$c305); } + } + 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 * 119 + 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$c306) { + s2 = peg$c306; + peg$currPos += 10; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c307); } + } + 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 * 119 + 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$c306) { + s2 = peg$c306; + peg$currPos += 10; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c307); } } if (s2 !== peg$FAILED) { s3 = peg$parse_(); @@ -9452,7 +9742,7 @@ module.exports = (function() { function peg$parseSQ_CLOSE() { var s0, s1, s2; - var key = peg$currPos * 115 + 81, + var key = peg$currPos * 119 + 85, cached = peg$resultsCache[key]; if (cached) { @@ -9491,7 +9781,7 @@ module.exports = (function() { function peg$parseCURLY_OPEN() { var s0, s1, s2; - var key = peg$currPos * 115 + 82, + var key = peg$currPos * 119 + 86, cached = peg$resultsCache[key]; if (cached) { @@ -9530,7 +9820,7 @@ module.exports = (function() { function peg$parseCURLY_CLOSE() { var s0, s1, s2; - var key = peg$currPos * 115 + 83, + var key = peg$currPos * 119 + 87, cached = peg$resultsCache[key]; if (cached) { @@ -9569,7 +9859,7 @@ module.exports = (function() { function peg$parsePAREN_OPEN() { var s0, s1, s2; - var key = peg$currPos * 115 + 84, + var key = peg$currPos * 119 + 88, cached = peg$resultsCache[key]; if (cached) { @@ -9580,11 +9870,11 @@ module.exports = (function() { s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 40) { - s1 = peg$c227; + s1 = peg$c230; peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c228); } + if (peg$silentFails === 0) { peg$fail(peg$c231); } } if (s1 !== peg$FAILED) { s2 = peg$parse_(); @@ -9601,12 +9891,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$c308) { + s1 = peg$c308; peg$currPos += 5; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c304); } + if (peg$silentFails === 0) { peg$fail(peg$c309); } } if (s1 !== peg$FAILED) { s2 = peg$parse_(); @@ -9623,12 +9913,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$c310) { + s1 = peg$c310; peg$currPos += 5; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c306); } + if (peg$silentFails === 0) { peg$fail(peg$c311); } } if (s1 !== peg$FAILED) { s2 = peg$parse_(); @@ -9645,12 +9935,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$c312) { + s1 = peg$c312; peg$currPos += 6; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c308); } + if (peg$silentFails === 0) { peg$fail(peg$c313); } } if (s1 !== peg$FAILED) { s2 = peg$parse_(); @@ -9667,12 +9957,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$c314) { + s1 = peg$c314; peg$currPos += 6; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c310); } + if (peg$silentFails === 0) { peg$fail(peg$c315); } } if (s1 !== peg$FAILED) { s2 = peg$parse_(); @@ -9689,12 +9979,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$c316) { + s1 = peg$c316; peg$currPos += 6; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c312); } + if (peg$silentFails === 0) { peg$fail(peg$c317); } } if (s1 !== peg$FAILED) { s2 = peg$parse_(); @@ -9711,12 +10001,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$c318) { + s1 = peg$c318; peg$currPos += 6; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c314); } + if (peg$silentFails === 0) { peg$fail(peg$c319); } } if (s1 !== peg$FAILED) { s2 = peg$parse_(); @@ -9733,12 +10023,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$c320) { + s1 = peg$c320; peg$currPos += 7; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c316); } + if (peg$silentFails === 0) { peg$fail(peg$c321); } } if (s1 !== peg$FAILED) { s2 = peg$parse_(); @@ -9755,12 +10045,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$c322) { + s1 = peg$c322; peg$currPos += 7; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c318); } + if (peg$silentFails === 0) { peg$fail(peg$c323); } } if (s1 !== peg$FAILED) { s2 = peg$parse_(); @@ -9777,12 +10067,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$c324) { + s1 = peg$c324; peg$currPos += 6; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c320); } + if (peg$silentFails === 0) { peg$fail(peg$c325); } } if (s1 !== peg$FAILED) { s2 = peg$parse_(); @@ -9815,7 +10105,7 @@ module.exports = (function() { function peg$parsePAREN_CLOSE() { var s0, s1, s2; - var key = peg$currPos * 115 + 85, + var key = peg$currPos * 119 + 89, cached = peg$resultsCache[key]; if (cached) { @@ -9826,11 +10116,11 @@ module.exports = (function() { s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 41) { - s1 = peg$c321; + s1 = peg$c326; peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c322); } + if (peg$silentFails === 0) { peg$fail(peg$c327); } } if (s1 !== peg$FAILED) { s2 = peg$parse_(); @@ -9847,12 +10137,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$c328) { + s1 = peg$c328; peg$currPos += 5; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c324); } + if (peg$silentFails === 0) { peg$fail(peg$c329); } } if (s1 !== peg$FAILED) { s2 = peg$parse_(); @@ -9869,12 +10159,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$c330) { + s1 = peg$c330; peg$currPos += 5; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c326); } + if (peg$silentFails === 0) { peg$fail(peg$c331); } } if (s1 !== peg$FAILED) { s2 = peg$parse_(); @@ -9891,12 +10181,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$c332) { + s1 = peg$c332; peg$currPos += 6; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c328); } + if (peg$silentFails === 0) { peg$fail(peg$c333); } } if (s1 !== peg$FAILED) { s2 = peg$parse_(); @@ -9913,12 +10203,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$c334) { + s1 = peg$c334; peg$currPos += 6; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c330); } + if (peg$silentFails === 0) { peg$fail(peg$c335); } } if (s1 !== peg$FAILED) { s2 = peg$parse_(); @@ -9935,12 +10225,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$c336) { + s1 = peg$c336; peg$currPos += 6; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c332); } + if (peg$silentFails === 0) { peg$fail(peg$c337); } } if (s1 !== peg$FAILED) { s2 = peg$parse_(); @@ -9957,12 +10247,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$c338) { + s1 = peg$c338; peg$currPos += 6; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c334); } + if (peg$silentFails === 0) { peg$fail(peg$c339); } } if (s1 !== peg$FAILED) { s2 = peg$parse_(); @@ -9979,12 +10269,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$c340) { + s1 = peg$c340; peg$currPos += 7; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c336); } + if (peg$silentFails === 0) { peg$fail(peg$c341); } } if (s1 !== peg$FAILED) { s2 = peg$parse_(); @@ -10001,12 +10291,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$c342) { + s1 = peg$c342; peg$currPos += 7; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c338); } + if (peg$silentFails === 0) { peg$fail(peg$c343); } } if (s1 !== peg$FAILED) { s2 = peg$parse_(); @@ -10022,12 +10312,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$c344) { + s0 = peg$c344; peg$currPos += 7; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c340); } + if (peg$silentFails === 0) { peg$fail(peg$c345); } } } } @@ -10047,7 +10337,7 @@ module.exports = (function() { function peg$parseSUP() { var s0, s1, s2; - var key = peg$currPos * 115 + 86, + var key = peg$currPos * 119 + 90, cached = peg$resultsCache[key]; if (cached) { @@ -10086,7 +10376,7 @@ module.exports = (function() { function peg$parseSUB() { var s0, s1, s2; - var key = peg$currPos * 115 + 87, + var key = peg$currPos * 119 + 91, cached = peg$resultsCache[key]; if (cached) { @@ -10125,7 +10415,7 @@ module.exports = (function() { function peg$parsegeneric_func() { var s0, s1, s2, s3; - var key = peg$currPos * 115 + 88, + var key = peg$currPos * 119 + 92, cached = peg$resultsCache[key]; if (cached) { @@ -10136,11 +10426,11 @@ module.exports = (function() { s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 92) { - s1 = peg$c249; + s1 = peg$c252; peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c250); } + if (peg$silentFails === 0) { peg$fail(peg$c253); } } if (s1 !== peg$FAILED) { s2 = []; @@ -10155,7 +10445,7 @@ module.exports = (function() { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c155(); + s1 = peg$c158(); s0 = s1; } else { peg$currPos = s0; @@ -10174,7 +10464,7 @@ module.exports = (function() { function peg$parseBIG() { var s0, s1, s2, s3; - var key = peg$currPos * 115 + 89, + var key = peg$currPos * 119 + 93, cached = peg$resultsCache[key]; if (cached) { @@ -10187,7 +10477,7 @@ module.exports = (function() { s1 = peg$parsegeneric_func(); if (s1 !== peg$FAILED) { peg$savedPos = peg$currPos; - s2 = peg$c341(s1); + s2 = peg$c346(s1); if (s2) { s2 = void 0; } else { @@ -10197,7 +10487,7 @@ module.exports = (function() { s3 = peg$parse_(); if (s3 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c267(s1); + s1 = peg$c270(s1); s0 = s1; } else { peg$currPos = s0; @@ -10220,7 +10510,7 @@ module.exports = (function() { function peg$parsePAREN() { var s0, s1, s2, s3, s4; - var key = peg$currPos * 115 + 90, + var key = peg$currPos * 119 + 94, cached = peg$resultsCache[key]; if (cached) { @@ -10233,7 +10523,7 @@ module.exports = (function() { s1 = peg$parsegeneric_func(); if (s1 !== peg$FAILED) { peg$savedPos = peg$currPos; - s2 = peg$c342(s1); + s2 = peg$c347(s1); if (s2) { s2 = void 0; } else { @@ -10248,7 +10538,7 @@ module.exports = (function() { } if (s3 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c267(s1); + s1 = peg$c270(s1); s0 = s1; } else { peg$currPos = s0; @@ -10271,7 +10561,7 @@ module.exports = (function() { function peg$parseFUN_AR1() { var s0, s1, s2, s3, s4; - var key = peg$currPos * 115 + 91, + var key = peg$currPos * 119 + 95, cached = peg$resultsCache[key]; if (cached) { @@ -10284,7 +10574,7 @@ module.exports = (function() { s1 = peg$parsegeneric_func(); if (s1 !== peg$FAILED) { peg$savedPos = peg$currPos; - s2 = peg$c343(s1); + s2 = peg$c348(s1); if (s2) { s2 = void 0; } else { @@ -10299,7 +10589,7 @@ module.exports = (function() { } if (s3 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c267(s1); + s1 = peg$c270(s1); s0 = s1; } else { peg$currPos = s0; @@ -10318,7 +10608,7 @@ module.exports = (function() { s1 = peg$parsegeneric_func(); if (s1 !== peg$FAILED) { peg$savedPos = peg$currPos; - s2 = peg$c344(s1); + s2 = peg$c349(s1); if (s2) { s2 = void 0; } else { @@ -10333,7 +10623,7 @@ module.exports = (function() { } if (s3 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c344(s1); + s1 = peg$c349(s1); s0 = s1; } else { peg$currPos = s0; @@ -10357,7 +10647,7 @@ module.exports = (function() { function peg$parseFUN_AR2() { var s0, s1, s2, s3, s4; - var key = peg$currPos * 115 + 92, + var key = peg$currPos * 119 + 96, cached = peg$resultsCache[key]; if (cached) { @@ -10370,7 +10660,7 @@ module.exports = (function() { s1 = peg$parsegeneric_func(); if (s1 !== peg$FAILED) { peg$savedPos = peg$currPos; - s2 = peg$c345(s1); + s2 = peg$c350(s1); if (s2) { s2 = void 0; } else { @@ -10385,7 +10675,7 @@ module.exports = (function() { } if (s3 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c267(s1); + s1 = peg$c270(s1); s0 = s1; } else { peg$currPos = s0; @@ -10408,7 +10698,7 @@ module.exports = (function() { function peg$parseFUN_AR3() { var s0, s1, s2, s3, s4; - var key = peg$currPos * 115 + 93, + var key = peg$currPos * 119 + 97, cached = peg$resultsCache[key]; if (cached) { @@ -10421,7 +10711,7 @@ module.exports = (function() { s1 = peg$parsegeneric_func(); if (s1 !== peg$FAILED) { peg$savedPos = peg$currPos; - s2 = peg$c346(s1); + s2 = peg$c351(s1); if (s2) { s2 = void 0; } else { @@ -10436,7 +10726,7 @@ module.exports = (function() { } if (s3 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c267(s1); + s1 = peg$c270(s1); s0 = s1; } else { peg$currPos = s0; @@ -10459,7 +10749,7 @@ module.exports = (function() { function peg$parseFUN_INFIX() { var s0, s1, s2, s3; - var key = peg$currPos * 115 + 94, + var key = peg$currPos * 119 + 98, cached = peg$resultsCache[key]; if (cached) { @@ -10472,7 +10762,7 @@ module.exports = (function() { s1 = peg$parsegeneric_func(); if (s1 !== peg$FAILED) { peg$savedPos = peg$currPos; - s2 = peg$c347(s1); + s2 = peg$c352(s1); if (s2) { s2 = void 0; } else { @@ -10482,7 +10772,7 @@ module.exports = (function() { s3 = peg$parse_(); if (s3 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c267(s1); + s1 = peg$c270(s1); s0 = s1; } else { peg$currPos = s0; @@ -10505,7 +10795,7 @@ module.exports = (function() { function peg$parseJACOBI() { var s0, s1, s2, s3, s4; - var key = peg$currPos * 115 + 95, + var key = peg$currPos * 119 + 99, cached = peg$resultsCache[key]; if (cached) { @@ -10518,7 +10808,7 @@ module.exports = (function() { s1 = peg$parsegeneric_func(); if (s1 !== peg$FAILED) { peg$savedPos = peg$currPos; - s2 = peg$c348(s1); + s2 = peg$c353(s1); if (s2) { s2 = void 0; } else { @@ -10533,7 +10823,7 @@ module.exports = (function() { } if (s3 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c267(s1); + s1 = peg$c270(s1); s0 = s1; } else { peg$currPos = s0; @@ -10556,7 +10846,7 @@ module.exports = (function() { function peg$parseLAGUERRE() { var s0, s1, s2, s3, s4; - var key = peg$currPos * 115 + 96, + var key = peg$currPos * 119 + 100, cached = peg$resultsCache[key]; if (cached) { @@ -10569,7 +10859,7 @@ module.exports = (function() { s1 = peg$parsegeneric_func(); if (s1 !== peg$FAILED) { peg$savedPos = peg$currPos; - s2 = peg$c349(s1); + s2 = peg$c354(s1); if (s2) { s2 = void 0; } else { @@ -10584,7 +10874,7 @@ module.exports = (function() { } if (s3 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c267(s1); + s1 = peg$c270(s1); s0 = s1; } else { peg$currPos = s0; @@ -10607,7 +10897,7 @@ module.exports = (function() { function peg$parseEJACOBI() { var s0; - var key = peg$currPos * 115 + 97, + var key = peg$currPos * 119 + 101, cached = peg$resultsCache[key]; if (cached) { @@ -10616,28 +10906,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$c355) { + s0 = peg$c355; peg$currPos += 2; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c351); } + if (peg$silentFails === 0) { peg$fail(peg$c356); } } if (s0 === peg$FAILED) { - if (input.substr(peg$currPos, 2) === peg$c352) { - s0 = peg$c352; + 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$c353); } + if (peg$silentFails === 0) { peg$fail(peg$c358); } } if (s0 === peg$FAILED) { - if (input.substr(peg$currPos, 2) === peg$c354) { - s0 = peg$c354; + 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$c355); } + if (peg$silentFails === 0) { peg$fail(peg$c360); } } } } @@ -10650,7 +10940,7 @@ module.exports = (function() { function peg$parseDECLh() { var s0, s1, s2, s3; - var key = peg$currPos * 115 + 98, + var key = peg$currPos * 119 + 102, cached = peg$resultsCache[key]; if (cached) { @@ -10663,7 +10953,7 @@ module.exports = (function() { s1 = peg$parsegeneric_func(); if (s1 !== peg$FAILED) { peg$savedPos = peg$currPos; - s2 = peg$c356(s1); + s2 = peg$c361(s1); if (s2) { s2 = void 0; } else { @@ -10673,7 +10963,7 @@ module.exports = (function() { s3 = peg$parse_(); if (s3 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c357(s1); + s1 = peg$c362(s1); s0 = s1; } else { peg$currPos = s0; @@ -10696,7 +10986,7 @@ module.exports = (function() { function peg$parseFUN_AR2nb() { var s0, s1, s2, s3, s4; - var key = peg$currPos * 115 + 99, + var key = peg$currPos * 119 + 103, cached = peg$resultsCache[key]; if (cached) { @@ -10709,7 +10999,7 @@ module.exports = (function() { s1 = peg$parsegeneric_func(); if (s1 !== peg$FAILED) { peg$savedPos = peg$currPos; - s2 = peg$c358(s1); + s2 = peg$c363(s1); if (s2) { s2 = void 0; } else { @@ -10724,7 +11014,7 @@ module.exports = (function() { } if (s3 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c267(s1); + s1 = peg$c270(s1); s0 = s1; } else { peg$currPos = s0; @@ -10747,7 +11037,7 @@ module.exports = (function() { function peg$parseLEFT() { var s0, s1, s2, s3; - var key = peg$currPos * 115 + 100, + var key = peg$currPos * 119 + 104, cached = peg$resultsCache[key]; if (cached) { @@ -10760,7 +11050,7 @@ module.exports = (function() { s1 = peg$parsegeneric_func(); if (s1 !== peg$FAILED) { peg$savedPos = peg$currPos; - s2 = peg$c359(s1); + s2 = peg$c364(s1); if (s2) { s2 = void 0; } else { @@ -10792,7 +11082,7 @@ module.exports = (function() { function peg$parseRIGHT() { var s0, s1, s2, s3; - var key = peg$currPos * 115 + 101, + var key = peg$currPos * 119 + 105, cached = peg$resultsCache[key]; if (cached) { @@ -10805,7 +11095,7 @@ module.exports = (function() { s1 = peg$parsegeneric_func(); if (s1 !== peg$FAILED) { peg$savedPos = peg$currPos; - s2 = peg$c360(s1); + s2 = peg$c365(s1); if (s2) { s2 = void 0; } else { @@ -10837,7 +11127,7 @@ module.exports = (function() { function peg$parseHLINE() { var s0, s1, s2, s3; - var key = peg$currPos * 115 + 102, + var key = peg$currPos * 119 + 106, cached = peg$resultsCache[key]; if (cached) { @@ -10850,7 +11140,7 @@ module.exports = (function() { s1 = peg$parsegeneric_func(); if (s1 !== peg$FAILED) { peg$savedPos = peg$currPos; - s2 = peg$c361(s1); + s2 = peg$c366(s1); if (s2) { s2 = void 0; } else { @@ -10860,7 +11150,7 @@ module.exports = (function() { s3 = peg$parse_(); if (s3 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c267(s1); + s1 = peg$c270(s1); s0 = s1; } else { peg$currPos = s0; @@ -10883,7 +11173,7 @@ module.exports = (function() { function peg$parseCOLOR() { var s0, s1, s2, s3, s4; - var key = peg$currPos * 115 + 103, + var key = peg$currPos * 119 + 107, cached = peg$resultsCache[key]; if (cached) { @@ -10896,7 +11186,7 @@ module.exports = (function() { s1 = peg$parsegeneric_func(); if (s1 !== peg$FAILED) { peg$savedPos = peg$currPos; - s2 = peg$c362(s1); + s2 = peg$c367(s1); if (s2) { s2 = void 0; } else { @@ -10908,7 +11198,7 @@ module.exports = (function() { s4 = peg$parseCOLOR_SPEC(); if (s4 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c363(s1, s4); + s1 = peg$c368(s1, s4); s0 = s1; } else { peg$currPos = s0; @@ -10935,7 +11225,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 * 119 + 108, cached = peg$resultsCache[key]; if (cached) { @@ -10948,7 +11238,7 @@ module.exports = (function() { s1 = peg$parsegeneric_func(); if (s1 !== peg$FAILED) { peg$savedPos = peg$currPos; - s2 = peg$c364(s1); + s2 = peg$c369(s1); if (s2) { s2 = void 0; } else { @@ -11001,12 +11291,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$c370) { 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$c371); } } if (s13 !== peg$FAILED) { s14 = peg$parse_(); @@ -11024,7 +11314,7 @@ module.exports = (function() { s17 = peg$parseCOLOR_SPEC_NAMED(); if (s17 !== peg$FAILED) { peg$savedPos = s12; - s13 = peg$c367(s1, s6, s17); + s13 = peg$c372(s1, s6, s17); s12 = s13; } else { peg$currPos = s12; @@ -11048,12 +11338,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$c373) { 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$c374); } } if (s13 !== peg$FAILED) { s14 = peg$parse_(); @@ -11071,7 +11361,7 @@ module.exports = (function() { s17 = peg$parseCOLOR_SPEC_GRAY(); if (s17 !== peg$FAILED) { peg$savedPos = s12; - s13 = peg$c370(s1, s6, s17); + s13 = peg$c375(s1, s6, s17); s12 = s13; } else { peg$currPos = s12; @@ -11095,12 +11385,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$c376) { + s13 = peg$c376; peg$currPos += 3; } else { s13 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c372); } + if (peg$silentFails === 0) { peg$fail(peg$c377); } } if (s13 !== peg$FAILED) { s14 = peg$parse_(); @@ -11118,7 +11408,7 @@ module.exports = (function() { s17 = peg$parseCOLOR_SPEC_rgb(); if (s17 !== peg$FAILED) { peg$savedPos = s12; - s13 = peg$c373(s1, s6, s17); + s13 = peg$c378(s1, s6, s17); s12 = s13; } else { peg$currPos = s12; @@ -11142,12 +11432,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$c379) { + s13 = peg$c379; peg$currPos += 3; } else { s13 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c375); } + if (peg$silentFails === 0) { peg$fail(peg$c380); } } if (s13 !== peg$FAILED) { s14 = peg$parse_(); @@ -11165,7 +11455,7 @@ module.exports = (function() { s17 = peg$parseCOLOR_SPEC_RGB(); if (s17 !== peg$FAILED) { peg$savedPos = s12; - s13 = peg$c373(s1, s6, s17); + s13 = peg$c378(s1, s6, s17); s12 = s13; } else { peg$currPos = s12; @@ -11189,12 +11479,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$c381) { 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$c382); } } if (s13 !== peg$FAILED) { s14 = peg$parse_(); @@ -11212,7 +11502,7 @@ module.exports = (function() { s17 = peg$parseCOLOR_SPEC_CMYK(); if (s17 !== peg$FAILED) { peg$savedPos = s12; - s13 = peg$c378(s1, s6, s17); + s13 = peg$c383(s1, s6, s17); s12 = s13; } else { peg$currPos = s12; @@ -11240,7 +11530,7 @@ module.exports = (function() { } if (s12 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c379(s1, s6, s12); + s1 = peg$c384(s1, s6, s12); s0 = s1; } else { peg$currPos = s0; @@ -11299,7 +11589,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 * 119 + 109, cached = peg$resultsCache[key]; if (cached) { @@ -11321,12 +11611,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$c370) { 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$c371); } } if (s3 !== peg$FAILED) { s4 = peg$parse_(); @@ -11344,7 +11634,7 @@ module.exports = (function() { s7 = peg$parseCOLOR_SPEC_NAMED(); if (s7 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c380(s7); + s1 = peg$c385(s7); s0 = s1; } else { peg$currPos = s0; @@ -11386,12 +11676,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$c373) { 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$c374); } } if (s3 !== peg$FAILED) { s4 = peg$parse_(); @@ -11409,7 +11699,7 @@ module.exports = (function() { s7 = peg$parseCOLOR_SPEC_GRAY(); if (s7 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c381(s7); + s1 = peg$c386(s7); s0 = s1; } else { peg$currPos = s0; @@ -11451,12 +11741,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$c376) { + s3 = peg$c376; peg$currPos += 3; } else { s3 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c372); } + if (peg$silentFails === 0) { peg$fail(peg$c377); } } if (s3 !== peg$FAILED) { s4 = peg$parse_(); @@ -11474,7 +11764,7 @@ module.exports = (function() { s7 = peg$parseCOLOR_SPEC_rgb(); if (s7 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c382(s7); + s1 = peg$c387(s7); s0 = s1; } else { peg$currPos = s0; @@ -11516,12 +11806,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$c379) { + s3 = peg$c379; peg$currPos += 3; } else { s3 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c375); } + if (peg$silentFails === 0) { peg$fail(peg$c380); } } if (s3 !== peg$FAILED) { s4 = peg$parse_(); @@ -11539,7 +11829,7 @@ module.exports = (function() { s7 = peg$parseCOLOR_SPEC_RGB(); if (s7 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c382(s7); + s1 = peg$c387(s7); s0 = s1; } else { peg$currPos = s0; @@ -11581,12 +11871,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$c381) { 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$c382); } } if (s3 !== peg$FAILED) { s4 = peg$parse_(); @@ -11604,7 +11894,7 @@ module.exports = (function() { s7 = peg$parseCOLOR_SPEC_CMYK(); if (s7 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c383(s7); + s1 = peg$c388(s7); s0 = s1; } else { peg$currPos = s0; @@ -11648,7 +11938,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 * 119 + 110, cached = peg$resultsCache[key]; if (cached) { @@ -11692,7 +11982,7 @@ module.exports = (function() { s6 = peg$parse_(); if (s6 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c384(s3); + s1 = peg$c389(s3); s0 = s1; } else { peg$currPos = s0; @@ -11727,7 +12017,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 * 119 + 111, cached = peg$resultsCache[key]; if (cached) { @@ -11767,7 +12057,7 @@ module.exports = (function() { } if (s4 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c385(s3); + s1 = peg$c390(s3); s0 = s1; } else { peg$currPos = s0; @@ -11794,7 +12084,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 * 119 + 112, cached = peg$resultsCache[key]; if (cached) { @@ -11851,7 +12141,7 @@ module.exports = (function() { s11 = peg$parse_(); if (s11 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c386(s3, s6, s9); + s1 = peg$c391(s3, s6, s9); s0 = s1; } else { peg$currPos = s0; @@ -11906,7 +12196,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 * 119 + 113, cached = peg$resultsCache[key]; if (cached) { @@ -11963,7 +12253,7 @@ module.exports = (function() { s11 = peg$parse_(); if (s11 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c386(s3, s6, s9); + s1 = peg$c391(s3, s6, s9); s0 = s1; } else { peg$currPos = s0; @@ -12018,7 +12308,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 * 119 + 114, cached = peg$resultsCache[key]; if (cached) { @@ -12087,7 +12377,7 @@ module.exports = (function() { s14 = peg$parse_(); if (s14 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c387(s3, s6, s9, s12); + s1 = peg$c392(s3, s6, s9, s12); s0 = s1; } else { peg$currPos = s0; @@ -12154,7 +12444,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 * 119 + 115, cached = peg$resultsCache[key]; if (cached) { @@ -12166,37 +12456,37 @@ module.exports = (function() { s0 = peg$currPos; s1 = peg$currPos; if (input.charCodeAt(peg$currPos) === 48) { - s2 = peg$c388; + s2 = peg$c393; peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c389); } + if (peg$silentFails === 0) { peg$fail(peg$c394); } } if (s2 === peg$FAILED) { s2 = peg$currPos; - if (peg$c390.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$c391); } + if (peg$silentFails === 0) { peg$fail(peg$c396); } } if (s3 !== peg$FAILED) { s4 = peg$currPos; - if (peg$c163.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$c164); } + if (peg$silentFails === 0) { peg$fail(peg$c167); } } if (s5 !== peg$FAILED) { - if (peg$c163.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$c164); } + if (peg$silentFails === 0) { peg$fail(peg$c167); } } if (s6 === peg$FAILED) { s6 = null; @@ -12234,7 +12524,7 @@ module.exports = (function() { } if (s1 !== peg$FAILED) { peg$savedPos = peg$currPos; - s2 = peg$c392(s1); + s2 = peg$c397(s1); if (s2) { s2 = void 0; } else { @@ -12244,7 +12534,7 @@ module.exports = (function() { s3 = peg$parse_(); if (s3 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c393(s1); + s1 = peg$c398(s1); s0 = s1; } else { peg$currPos = s0; @@ -12267,7 +12557,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 * 119 + 116, cached = peg$resultsCache[key]; if (cached) { @@ -12280,41 +12570,41 @@ module.exports = (function() { s1 = peg$currPos; s2 = peg$currPos; if (input.charCodeAt(peg$currPos) === 48) { - s3 = peg$c388; + s3 = peg$c393; peg$currPos++; } else { s3 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c389); } + 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$c186; + s4 = peg$c189; peg$currPos++; } else { s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c187); } + if (peg$silentFails === 0) { peg$fail(peg$c190); } } if (s4 !== peg$FAILED) { s5 = []; - if (peg$c163.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$c164); } + if (peg$silentFails === 0) { peg$fail(peg$c167); } } if (s6 !== peg$FAILED) { while (s6 !== peg$FAILED) { s5.push(s6); - if (peg$c163.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$c164); } + if (peg$silentFails === 0) { peg$fail(peg$c167); } } } } else { @@ -12344,7 +12634,7 @@ module.exports = (function() { s2 = peg$parse_(); if (s2 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c394(s1); + s1 = peg$c399(s1); s0 = s1; } else { peg$currPos = s0; @@ -12358,20 +12648,20 @@ module.exports = (function() { s0 = peg$currPos; s1 = peg$currPos; s2 = peg$currPos; - if (peg$c395.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$c396); } + if (peg$silentFails === 0) { peg$fail(peg$c401); } } if (s3 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 46) { - s4 = peg$c186; + s4 = peg$c189; peg$currPos++; } else { s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c187); } + if (peg$silentFails === 0) { peg$fail(peg$c190); } } if (s4 === peg$FAILED) { s4 = null; @@ -12396,7 +12686,7 @@ module.exports = (function() { s2 = peg$parse_(); if (s2 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c394(s1); + s1 = peg$c399(s1); s0 = s1; } else { peg$currPos = s0; @@ -12416,7 +12706,7 @@ module.exports = (function() { function peg$parseimpossible() { var s0; - var key = peg$currPos * 115 + 113, + var key = peg$currPos * 119 + 117, cached = peg$resultsCache[key]; if (cached) { @@ -12426,7 +12716,7 @@ module.exports = (function() { } peg$savedPos = peg$currPos; - s0 = peg$c397(); + s0 = peg$c402(); if (s0) { s0 = void 0; } else { @@ -12441,7 +12731,7 @@ module.exports = (function() { function peg$parseEOF() { var s0; - var key = peg$currPos * 115 + 114, + var key = peg$currPos * 119 + 118, cached = peg$resultsCache[key]; if (cached) { @@ -12451,7 +12741,7 @@ module.exports = (function() { } peg$savedPos = peg$currPos; - s0 = peg$c398(); + s0 = peg$c403(); if (s0) { s0 = void 0; } else { @@ -12485,16 +12775,15 @@ 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 ? - 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) ); } } diff --git a/lib/parser.pegjs b/lib/parser.pegjs index 9ff9884..59c47e7 100644 --- a/lib/parser.pegjs +++ b/lib/parser.pegjs @@ -218,6 +218,8 @@ 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{" 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 +296,8 @@ 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{" 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 +352,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 +556,10 @@ BEGIN_CASES = BEGIN "{cases}" _ END_CASES = END "{cases}" _ +BEGIN_MULTLINE + = BEGIN "{multline}" _ +END_MULTLINE + = 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 3814208..93320fa 100644 --- a/lib/texutil.js +++ b/lib/texutil.js @@ -700,6 +700,8 @@ module.exports.ams_required = arr2set([ "\\begin{alignedat}", "\\begin{smallmatrix}", "\\begin{cases}", + "\\begin{multline}", + "\\begin{multline*}", "\\ulcorner", "\\urcorner", 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": {