UNPKG

jssm

Version:

A Javascript finite state machine (FSM) with a terse DSL and a simple API. Most FSMs are one-liners. Fast, easy, powerful, well tested, typed with TypeScript, and visualizations. MIT License.

344 lines (339 loc) 4.12 MB
'use strict'; class circular_buffer{constructor(uCapacity){if(!Number.isInteger(uCapacity)){throw new RangeError(`Capacity must be an integer, received ${uCapacity}`)}if(uCapacity<0){throw new RangeError(`Capacity must be a non-negative integer, received ${uCapacity}`)}this._values=new Array(uCapacity);this._capacity=uCapacity;this._cursor=0;this._offset=0;this._length=0;}get capacity(){return this._capacity}set capacity(newSize){this.resize(newSize);}get length(){return this._length}set length(newLength){if(newLength>this._capacity){throw new RangeError(`Requested new length [${newLength}] exceeds container capacity [${this._capacity}]`)}if(newLength<0){throw new RangeError(`Requested new length [${newLength}] cannot be negative`)}if(!Number.isInteger(newLength)){throw new RangeError(`Requested new length [${newLength}] must be an integer`)}if(this._length<=newLength){return}this._length=newLength;}get available(){return this._capacity-this._length}get isEmpty(){return this._length===0}get isFull(){return this._length===this._capacity}get first(){if(this.isEmpty){throw new RangeError("Cannot return first element of an empty container")}return this.at(0)}get last(){if(this.isEmpty){throw new RangeError("Cannot return last element of an empty container")}return this.at(this.length-1)}static from(i,map_fn,t){const new_array=map_fn?Array.from(i,map_fn,t):Array.from(i);const target_length=new_array.length;const ncb=new circular_buffer(target_length);ncb._values=new_array;ncb._length=target_length;return ncb}push(v){if(this.isFull){throw new RangeError(`Cannot push, structure is full to capacity`)}this._values[(this._cursor+this._length++)%this._capacity]=v;return v}shove(v){let shoved;if(this._capacity===0){throw new RangeError(`Cannot shove, structure is zero-capacity`)}if(this.isFull){shoved=this.pop();}this.push(v);return shoved}fill(x){for(let i=0;i<this._capacity;i++){this._values[i]=x;}this._length=this._capacity;return this._values}indexOf(searchElement,fromIndex){const normalized=this.toArray();return normalized.indexOf(searchElement,fromIndex)}find(predicate,thisArg){return this.toArray().find(predicate,thisArg)}every(functor,thisArg){const normalized=this.toArray(),res=normalized.every(functor,thisArg);this._values=normalized;this._values.length=this._capacity;this._cursor=0;return res}some(functor,thisArg){const normalized=this.toArray(),res=normalized.some(functor,thisArg);this._values=normalized;this._values.length=this._capacity;this._cursor=0;return res}reverse(){const normalized=this.toArray();this._values=normalized.reverse();this._values.length=this._capacity;this._cursor=0;return this}clear(){const old=this.toArray();this._length=0;return old}pop(){if(this._length<=0){throw new RangeError(`Cannot pop, structure is empty`)}const cache=this.at(0);--this._length;++this._offset;++this._cursor;if(this._cursor>=this._capacity){this._cursor-=this._capacity;}return cache}at(i){if(i<0){throw new RangeError(`circular_buffer does not support negative traversals; called at(${i})`)}if(!Number.isInteger(i)){throw new RangeError(`Accessors must be non-negative integers; called at(${i})`)}if(i>=this._capacity){throw new RangeError(`Requested cell ${i} exceeds container permanent capacity`)}if(i>=this._length){throw new RangeError(`Requested cell ${i} exceeds container current length`)}return this._values[(this._cursor+i)%this._capacity]}pos(i){return this.at(i-this.offset())}offset(){return this._offset}resize(newSize,preferEnd=false){this._values=this.toArray();this._cursor=0;const oldSize=this._length;this._length=Math.min(this._length,newSize);this._capacity=newSize;if(newSize>=oldSize){this._values.length=newSize;}else {if(preferEnd){const tmp=this._values.slice(oldSize-newSize);this._values=tmp;}else {this._values.length=newSize;}}}toArray(){const startPoint=this._cursor%this._capacity;if(this._capacity>startPoint+this._length){return this._values.slice(startPoint,startPoint+this._length)}else {const base=this._values.slice(startPoint,this._capacity);base.push(...this._values.slice(0,this.length-(this._capacity-startPoint)));return base}}} const FslDirections = ['up', 'right', 'down', 'left']; class JssmError extends Error { constructor(machine, message, JEEI) { const { requested_state } = (JEEI === undefined) ? { requested_state: undefined } : JEEI; const follow_ups = []; if (machine) { if (machine.state() !== undefined) { follow_ups.push(`at "${machine.state()}"`); } } if (requested_state !== undefined) { follow_ups.push(`requested "${requested_state}"`); } const complex_msg = `${((machine === null || machine === void 0 ? void 0 : machine.instance_name()) !== undefined) ? `[[${machine.instance_name()}]]: ` : ''}${message}${follow_ups.length ? ` (${follow_ups.join(', ')})` : ''}`; super(complex_msg); this.name = 'JssmError'; this.message = complex_msg; this.base_message = message; this.requested_state = requested_state; } } /* eslint-disable complexity */ /********* * * Return the direction of an arrow - `right`, `left`, or `both`. * * ```typescript * import { arrow_direction } from 'jssm'; * * arrow_direction('->'); // 'right' * arrow_direction('<~=>'); // 'both' * ``` * * @param arrow The arrow to be evaluated * */ function arrow_direction(arrow) { switch (String(arrow)) { case '->': case '→': case '=>': case '⇒': case '~>': case '↛': return 'right'; case '<-': case '←': case '<=': case '⇐': case '<~': case '↚': return 'left'; case '<->': case '↔': case '<-=>': case '←⇒': case '←=>': case '<-⇒': case '<-~>': case '←↛': case '←~>': case '<-↛': case '<=>': case '⇔': case '<=->': case '⇐→': case '⇐->': case '<=→': case '<=~>': case '⇐↛': case '⇐~>': case '<=↛': case '<~>': case '↮': case '<~->': case '↚→': case '↚->': case '<~→': case '<~=>': case '↚⇒': case '↚=>': case '<~⇒': return 'both'; default: throw new JssmError(undefined, `arrow_direction: unknown arrow type ${arrow}`); } } /* eslint-enable complexity */ /* eslint-disable complexity */ /********* * * Return the direction of an arrow - `right`, `left`, or `both`. * * ```typescript * import { arrow_left_kind } from 'jssm'; * * arrow_left_kind('<-'); // 'legal' * arrow_left_kind('<='); // 'main' * arrow_left_kind('<~'); // 'forced' * arrow_left_kind('<->'); // 'legal' * arrow_left_kind('->'); // 'none' * ``` * * @param arrow The arrow to be evaluated * */ function arrow_left_kind(arrow) { switch (String(arrow)) { case '->': case '→': case '=>': case '⇒': case '~>': case '↛': return 'none'; case '<-': case '←': case '<->': case '↔': case '<-=>': case '←⇒': case '<-~>': case '←↛': return 'legal'; case '<=': case '⇐': case '<=>': case '⇔': case '<=->': case '⇐→': case '<=~>': case '⇐↛': return 'main'; case '<~': case '↚': case '<~>': case '↮': case '<~->': case '↚→': case '<~=>': case '↚⇒': return 'forced'; default: throw new JssmError(undefined, `arrow_direction: unknown arrow type ${arrow}`); } } /* eslint-enable complexity */ /* eslint-disable complexity */ /********* * * Return the direction of an arrow - `right`, `left`, or `both`. * * ```typescript * import { arrow_left_kind } from 'jssm'; * * arrow_left_kind('->'); // 'legal' * arrow_left_kind('=>'); // 'main' * arrow_left_kind('~>'); // 'forced' * arrow_left_kind('<->'); // 'legal' * arrow_left_kind('<-'); // 'none' * ``` * * @param arrow The arrow to be evaluated * */ function arrow_right_kind(arrow) { switch (String(arrow)) { case '<-': case '←': case '<=': case '⇐': case '<~': case '↚': return 'none'; case '->': case '→': case '<->': case '↔': case '<=->': case '⇐→': case '<~->': case '↚→': return 'legal'; case '=>': case '⇒': case '<=>': case '⇔': case '<-=>': case '←⇒': case '<~=>': case '↚⇒': return 'main'; case '~>': case '↛': case '<~>': case '↮': case '<-~>': case '←↛': case '<=~>': case '⇐↛': return 'forced'; default: throw new JssmError(undefined, `arrow_direction: unknown arrow type ${arrow}`); } } /* * Generated by PEG.js 0.10.0. * * http://pegjs.org/ */ function peg$subclass(child, parent) { function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); } function peg$SyntaxError(message, expected, found, location) { this.message = message; this.expected = expected; this.found = found; this.location = location; this.name = "SyntaxError"; if (typeof Error.captureStackTrace === "function") { Error.captureStackTrace(this, peg$SyntaxError); } } peg$subclass(peg$SyntaxError, Error); peg$SyntaxError.buildMessage = function (expected, found) { var DESCRIBE_EXPECTATION_FNS = { literal: function (expectation) { return "\"" + literalEscape(expectation.text) + "\""; }, "class": function (expectation) { var escapedParts = "", i; for (i = 0; i < expectation.parts.length; i++) { escapedParts += expectation.parts[i] instanceof Array ? classEscape(expectation.parts[i][0]) + "-" + classEscape(expectation.parts[i][1]) : classEscape(expectation.parts[i]); } return "[" + (expectation.inverted ? "^" : "") + escapedParts + "]"; }, any: function (expectation) { return "any character"; }, end: function (expectation) { return "end of input"; }, other: function (expectation) { return expectation.description; } }; function hex(ch) { return ch.charCodeAt(0).toString(16).toUpperCase(); } function literalEscape(s) { return s .replace(/\\/g, '\\\\') .replace(/"/g, '\\"') .replace(/\0/g, '\\0') .replace(/\t/g, '\\t') .replace(/\n/g, '\\n') .replace(/\r/g, '\\r') .replace(/[\x00-\x0F]/g, function (ch) { return '\\x0' + hex(ch); }) .replace(/[\x10-\x1F\x7F-\x9F]/g, function (ch) { return '\\x' + hex(ch); }); } function classEscape(s) { return s .replace(/\\/g, '\\\\') .replace(/\]/g, '\\]') .replace(/\^/g, '\\^') .replace(/-/g, '\\-') .replace(/\0/g, '\\0') .replace(/\t/g, '\\t') .replace(/\n/g, '\\n') .replace(/\r/g, '\\r') .replace(/[\x00-\x0F]/g, function (ch) { return '\\x0' + hex(ch); }) .replace(/[\x10-\x1F\x7F-\x9F]/g, function (ch) { return '\\x' + hex(ch); }); } function describeExpectation(expectation) { return DESCRIBE_EXPECTATION_FNS[expectation.type](expectation); } function describeExpected(expected) { var descriptions = new Array(expected.length), i, j; for (i = 0; i < expected.length; i++) { descriptions[i] = describeExpectation(expected[i]); } descriptions.sort(); if (descriptions.length > 0) { for (i = 1, j = 1; i < descriptions.length; i++) { if (descriptions[i - 1] !== descriptions[i]) { descriptions[j] = descriptions[i]; j++; } } descriptions.length = j; } switch (descriptions.length) { case 1: return descriptions[0]; case 2: return descriptions[0] + " or " + descriptions[1]; default: return descriptions.slice(0, -1).join(", ") + ", or " + descriptions[descriptions.length - 1]; } } function describeFound(found) { return found ? "\"" + literalEscape(found) + "\"" : "end of input"; } return "Expected " + describeExpected(expected) + " but " + describeFound(found) + " found."; }; function peg$parse(input, options) { options = options !== void 0 ? options : {}; var peg$FAILED = {}, peg$startRuleFunctions = { Document: peg$parseDocument }, peg$startRuleFunction = peg$parseDocument, peg$c0 = function (e) { return e; }, peg$c1 = "none", peg$c2 = peg$literalExpectation("none", false), peg$c3 = "default", peg$c4 = peg$literalExpectation("default", false), peg$c5 = "modern", peg$c6 = peg$literalExpectation("modern", false), peg$c7 = "ocean", peg$c8 = peg$literalExpectation("ocean", false), peg$c9 = "bold", peg$c10 = peg$literalExpectation("bold", false), peg$c11 = "[", peg$c12 = peg$literalExpectation("[", false), peg$c13 = "]", peg$c14 = peg$literalExpectation("]", false), peg$c15 = function (ths, th) { const themes = ths.map(t => t[0]); themes.push(th); return themes; }, peg$c16 = function (th) { return [th]; }, peg$c17 = "box3d", peg$c18 = peg$literalExpectation("box3d", false), peg$c19 = "polygon", peg$c20 = peg$literalExpectation("polygon", false), peg$c21 = "ellipse", peg$c22 = peg$literalExpectation("ellipse", false), peg$c23 = "oval", peg$c24 = peg$literalExpectation("oval", false), peg$c25 = "circle", peg$c26 = peg$literalExpectation("circle", false), peg$c27 = "point", peg$c28 = peg$literalExpectation("point", false), peg$c29 = "egg", peg$c30 = peg$literalExpectation("egg", false), peg$c31 = "triangle", peg$c32 = peg$literalExpectation("triangle", false), peg$c33 = "plaintext", peg$c34 = peg$literalExpectation("plaintext", false), peg$c35 = "plain", peg$c36 = peg$literalExpectation("plain", false), peg$c37 = "diamond", peg$c38 = peg$literalExpectation("diamond", false), peg$c39 = "trapezium", peg$c40 = peg$literalExpectation("trapezium", false), peg$c41 = "parallelogram", peg$c42 = peg$literalExpectation("parallelogram", false), peg$c43 = "house", peg$c44 = peg$literalExpectation("house", false), peg$c45 = "pentagon", peg$c46 = peg$literalExpectation("pentagon", false), peg$c47 = "hexagon", peg$c48 = peg$literalExpectation("hexagon", false), peg$c49 = "septagon", peg$c50 = peg$literalExpectation("septagon", false), peg$c51 = "octagon", peg$c52 = peg$literalExpectation("octagon", false), peg$c53 = "doublecircle", peg$c54 = peg$literalExpectation("doublecircle", false), peg$c55 = "doubleoctagon", peg$c56 = peg$literalExpectation("doubleoctagon", false), peg$c57 = "tripleoctagon", peg$c58 = peg$literalExpectation("tripleoctagon", false), peg$c59 = "invtriangle", peg$c60 = peg$literalExpectation("invtriangle", false), peg$c61 = "invtrapezium", peg$c62 = peg$literalExpectation("invtrapezium", false), peg$c63 = "invhouse", peg$c64 = peg$literalExpectation("invhouse", false), peg$c65 = "Mdiamond", peg$c66 = peg$literalExpectation("Mdiamond", false), peg$c67 = "Msquare", peg$c68 = peg$literalExpectation("Msquare", false), peg$c69 = "Mcircle", peg$c70 = peg$literalExpectation("Mcircle", false), peg$c71 = "rectangle", peg$c72 = peg$literalExpectation("rectangle", false), peg$c73 = "rect", peg$c74 = peg$literalExpectation("rect", false), peg$c75 = "square", peg$c76 = peg$literalExpectation("square", false), peg$c77 = "star", peg$c78 = peg$literalExpectation("star", false), peg$c79 = "underline", peg$c80 = peg$literalExpectation("underline", false), peg$c81 = "cylinder", peg$c82 = peg$literalExpectation("cylinder", false), peg$c83 = "note", peg$c84 = peg$literalExpectation("note", false), peg$c85 = "tab", peg$c86 = peg$literalExpectation("tab", false), peg$c87 = "folder", peg$c88 = peg$literalExpectation("folder", false), peg$c89 = "box", peg$c90 = peg$literalExpectation("box", false), peg$c91 = "component", peg$c92 = peg$literalExpectation("component", false), peg$c93 = "promoter", peg$c94 = peg$literalExpectation("promoter", false), peg$c95 = "cds", peg$c96 = peg$literalExpectation("cds", false), peg$c97 = "terminator", peg$c98 = peg$literalExpectation("terminator", false), peg$c99 = "utr", peg$c100 = peg$literalExpectation("utr", false), peg$c101 = "primersite", peg$c102 = peg$literalExpectation("primersite", false), peg$c103 = "restrictionsite", peg$c104 = peg$literalExpectation("restrictionsite", false), peg$c105 = "fivepoverhang", peg$c106 = peg$literalExpectation("fivepoverhang", false), peg$c107 = "threepoverhang", peg$c108 = peg$literalExpectation("threepoverhang", false), peg$c109 = "noverhang", peg$c110 = peg$literalExpectation("noverhang", false), peg$c111 = "assembly", peg$c112 = peg$literalExpectation("assembly", false), peg$c113 = "signature", peg$c114 = peg$literalExpectation("signature", false), peg$c115 = "insulator", peg$c116 = peg$literalExpectation("insulator", false), peg$c117 = "ribosite", peg$c118 = peg$literalExpectation("ribosite", false), peg$c119 = "rnastab", peg$c120 = peg$literalExpectation("rnastab", false), peg$c121 = "proteasesite", peg$c122 = peg$literalExpectation("proteasesite", false), peg$c123 = "proteinstab", peg$c124 = peg$literalExpectation("proteinstab", false), peg$c125 = "rpromoter", peg$c126 = peg$literalExpectation("rpromoter", false), peg$c127 = "rarrow", peg$c128 = peg$literalExpectation("rarrow", false), peg$c129 = "larrow", peg$c130 = peg$literalExpectation("larrow", false), peg$c131 = "lpromoter", peg$c132 = peg$literalExpectation("lpromoter", false), peg$c133 = "record", peg$c134 = peg$literalExpectation("record", false), peg$c135 = peg$otherExpectation("forward light arrow ->"), peg$c136 = "->", peg$c137 = peg$literalExpectation("->", false), peg$c138 = "\u2192", peg$c139 = peg$literalExpectation("\u2192", false), peg$c140 = function () { return "->"; }, peg$c141 = peg$otherExpectation("two way light arrow <->"), peg$c142 = "<->", peg$c143 = peg$literalExpectation("<->", false), peg$c144 = "\u2194", peg$c145 = peg$literalExpectation("\u2194", false), peg$c146 = function () { return "<->"; }, peg$c147 = peg$otherExpectation("back light arrow <-"), peg$c148 = "<-", peg$c149 = peg$literalExpectation("<-", false), peg$c150 = "\u2190", peg$c151 = peg$literalExpectation("\u2190", false), peg$c152 = function () { return "<-"; }, peg$c153 = peg$otherExpectation("forward fat arrow =>"), peg$c154 = "=>", peg$c155 = peg$literalExpectation("=>", false), peg$c156 = "\u21D2", peg$c157 = peg$literalExpectation("\u21D2", false), peg$c158 = function () { return "=>"; }, peg$c159 = peg$otherExpectation("two way fat arrow <=>"), peg$c160 = "<=>", peg$c161 = peg$literalExpectation("<=>", false), peg$c162 = "\u21D4", peg$c163 = peg$literalExpectation("\u21D4", false), peg$c164 = function () { return "<=>"; }, peg$c165 = peg$otherExpectation("back fat arrow <="), peg$c166 = "<=", peg$c167 = peg$literalExpectation("<=", false), peg$c168 = "\u21D0", peg$c169 = peg$literalExpectation("\u21D0", false), peg$c170 = function () { return "<="; }, peg$c171 = peg$otherExpectation("forward tilde arrow ~>"), peg$c172 = "~>", peg$c173 = peg$literalExpectation("~>", false), peg$c174 = "\u219B", peg$c175 = peg$literalExpectation("\u219B", false), peg$c176 = function () { return "~>"; }, peg$c177 = peg$otherExpectation("two way tilde arrow <~>"), peg$c178 = "<~>", peg$c179 = peg$literalExpectation("<~>", false), peg$c180 = "\u21AE", peg$c181 = peg$literalExpectation("\u21AE", false), peg$c182 = function () { return "<~>"; }, peg$c183 = peg$otherExpectation("back tilde arrow <~"), peg$c184 = "<~", peg$c185 = peg$literalExpectation("<~", false), peg$c186 = "\u219A", peg$c187 = peg$literalExpectation("\u219A", false), peg$c188 = function () { return "<~"; }, peg$c189 = peg$otherExpectation("light fat arrow <-=>"), peg$c190 = "<-=>", peg$c191 = peg$literalExpectation("<-=>", false), peg$c192 = "\u2190\u21D2", peg$c193 = peg$literalExpectation("\u2190\u21D2", false), peg$c194 = function () { return "<-=>"; }, peg$c195 = peg$otherExpectation("light tilde arrow <-~>"), peg$c196 = "<-~>", peg$c197 = peg$literalExpectation("<-~>", false), peg$c198 = "\u2190\u219B", peg$c199 = peg$literalExpectation("\u2190\u219B", false), peg$c200 = function () { return "<-~>"; }, peg$c201 = peg$otherExpectation("fat light arrow <=->"), peg$c202 = "<=->", peg$c203 = peg$literalExpectation("<=->", false), peg$c204 = "\u21D0\u2192", peg$c205 = peg$literalExpectation("\u21D0\u2192", false), peg$c206 = function () { return "<=->"; }, peg$c207 = peg$otherExpectation("fat tilde arrow <=~>"), peg$c208 = "<=~>", peg$c209 = peg$literalExpectation("<=~>", false), peg$c210 = "\u21D0\u219B", peg$c211 = peg$literalExpectation("\u21D0\u219B", false), peg$c212 = function () { return "<=~>"; }, peg$c213 = peg$otherExpectation("tilde light arrow <~->"), peg$c214 = "<~->", peg$c215 = peg$literalExpectation("<~->", false), peg$c216 = "\u219A\u2192", peg$c217 = peg$literalExpectation("\u219A\u2192", false), peg$c218 = function () { return "<~->"; }, peg$c219 = peg$otherExpectation("tilde fat arrow <~=>"), peg$c220 = "<~=>", peg$c221 = peg$literalExpectation("<~=>", false), peg$c222 = "\u219A\u21D2", peg$c223 = peg$literalExpectation("\u219A\u21D2", false), peg$c224 = function () { return "<~=>"; }, peg$c225 = peg$otherExpectation("light arrow"), peg$c226 = peg$otherExpectation("fat arrow"), peg$c227 = peg$otherExpectation("tilde arrow"), peg$c228 = peg$otherExpectation("mixed arrow"), peg$c229 = peg$otherExpectation("arrow"), peg$c230 = "true", peg$c231 = peg$literalExpectation("true", false), peg$c232 = function () { return true; }, peg$c233 = "false", peg$c234 = peg$literalExpectation("false", false), peg$c235 = function () { return false; }, peg$c236 = "regular", peg$c237 = peg$literalExpectation("regular", false), peg$c238 = "rounded", peg$c239 = peg$literalExpectation("rounded", false), peg$c240 = "lined", peg$c241 = peg$literalExpectation("lined", false), peg$c242 = "solid", peg$c243 = peg$literalExpectation("solid", false), peg$c244 = "dotted", peg$c245 = peg$literalExpectation("dotted", false), peg$c246 = "dashed", peg$c247 = peg$literalExpectation("dashed", false), peg$c248 = "\"", peg$c249 = peg$literalExpectation("\"", false), peg$c250 = "\\", peg$c251 = peg$literalExpectation("\\", false), peg$c252 = "/", peg$c253 = peg$literalExpectation("/", false), peg$c254 = "b", peg$c255 = peg$literalExpectation("b", false), peg$c256 = function () { return "\b"; }, peg$c257 = "f", peg$c258 = peg$literalExpectation("f", false), peg$c259 = function () { return "\f"; }, peg$c260 = "n", peg$c261 = peg$literalExpectation("n", false), peg$c262 = function () { return "\n"; }, peg$c263 = "r", peg$c264 = peg$literalExpectation("r", false), peg$c265 = function () { return "\r"; }, peg$c266 = "t", peg$c267 = peg$literalExpectation("t", false), peg$c268 = function () { return "\t"; }, peg$c269 = "v", peg$c270 = peg$literalExpectation("v", false), peg$c271 = function () { return "\v"; }, peg$c272 = "u", peg$c273 = peg$literalExpectation("u", false), peg$c274 = function (digits) { return String.fromCharCode(parseInt(digits, 16)); }, peg$c275 = function (Sequence) { return Sequence; }, peg$c276 = "null", peg$c277 = peg$literalExpectation("null", false), peg$c278 = function () { return null; }, peg$c279 = "undefined", peg$c280 = peg$literalExpectation("undefined", false), peg$c281 = function () { return undefined; }, peg$c282 = /^[\0-!#-[\]-\uFFFF]/, peg$c283 = peg$classExpectation([["\0", "!"], ["#", "["], ["]", "\uFFFF"]], false, false), peg$c284 = "'", peg$c285 = peg$literalExpectation("'", false), peg$c286 = /^[ -&(-[\]-\uFFFF]/, peg$c287 = peg$classExpectation([[" ", "&"], ["(", "["], ["]", "\uFFFF"]], false, false), peg$c288 = peg$otherExpectation("action label"), peg$c289 = function (chars) { return chars.join(""); }, peg$c290 = /^[\n\r\u2028\u2029]/, peg$c291 = peg$classExpectation(["\n", "\r", "\u2028", "\u2029"], false, false), peg$c294 = "*/", peg$c295 = peg$literalExpectation("*/", false), peg$c296 = peg$anyExpectation(), peg$c297 = peg$otherExpectation("block comment"), peg$c298 = "/*", peg$c299 = peg$literalExpectation("/*", false), peg$c300 = peg$otherExpectation("line comment"), peg$c301 = "//", peg$c302 = peg$literalExpectation("//", false), peg$c303 = peg$otherExpectation("whitespace"), peg$c304 = /^[ \t\r\n\x0B]/, peg$c305 = peg$classExpectation([" ", "\t", "\r", "\n", "\x0B"], false, false), peg$c306 = peg$otherExpectation("string"), peg$c307 = /^[0-9a-zA-Z._!$\^*!?,\x80-\uFFFF]/, peg$c308 = peg$classExpectation([["0", "9"], ["a", "z"], ["A", "Z"], ".", "_", "!", "$", "^", "*", "!", "?", ",", ["\x80", "\uFFFF"]], false, false), peg$c309 = /^[0-9a-zA-Z.+_\^()*&$#@!?,\x80-\uFFFF]/, peg$c310 = peg$classExpectation([["0", "9"], ["a", "z"], ["A", "Z"], ".", "+", "_", "^", "(", ")", "*", "&", "$", "#", "@", "!", "?", ",", ["\x80", "\uFFFF"]], false, false), peg$c311 = peg$otherExpectation("atom"), peg$c312 = function (firstletter, text) { return firstletter + ((text || []).join('')); }, peg$c313 = peg$otherExpectation("label"), peg$c314 = "0", peg$c315 = peg$literalExpectation("0", false), peg$c316 = /^[0-9]/, peg$c317 = peg$classExpectation([["0", "9"]], false, false), peg$c318 = /^[1-9]/, peg$c319 = peg$classExpectation([["1", "9"]], false, false), peg$c320 = /^[0-9a-f]/i, peg$c321 = peg$classExpectation([["0", "9"], ["a", "f"]], false, true), peg$c322 = /^[0-1]/, peg$c323 = peg$classExpectation([["0", "1"]], false, false), peg$c324 = peg$otherExpectation("nonneg number"), peg$c325 = ".", peg$c326 = peg$literalExpectation(".", false), peg$c327 = function () { return parseFloat(text()); }, peg$c328 = peg$otherExpectation("number"), peg$c329 = function (literal) { return literal; }, peg$c330 = "NaN", peg$c331 = peg$literalExpectation("NaN", false), peg$c332 = function () { return NaN; }, peg$c333 = "NegativeInfinity", peg$c334 = peg$literalExpectation("NegativeInfinity", false), peg$c335 = function () { return Number.NEGATIVE_INFINITY; }, peg$c336 = "NegativeInf", peg$c337 = peg$literalExpectation("NegativeInf", false), peg$c338 = "NegInfinity", peg$c339 = peg$literalExpectation("NegInfinity", false), peg$c340 = "NegInf", peg$c341 = peg$literalExpectation("NegInf", false), peg$c342 = "NInfinity", peg$c343 = peg$literalExpectation("NInfinity", false), peg$c344 = "NInf", peg$c345 = peg$literalExpectation("NInf", false), peg$c346 = "-\u221E", peg$c347 = peg$literalExpectation("-\u221E", false), peg$c348 = "PInfinity", peg$c349 = peg$literalExpectation("PInfinity", false), peg$c350 = function () { return Number.POSITIVE_INFINITY; }, peg$c351 = "Infinity", peg$c352 = peg$literalExpectation("Infinity", false), peg$c353 = "PInf", peg$c354 = peg$literalExpectation("PInf", false), peg$c355 = "Inf", peg$c356 = peg$literalExpectation("Inf", false), peg$c357 = "\u221E", peg$c358 = peg$literalExpectation("\u221E", false), peg$c359 = "Epsilon", peg$c360 = peg$literalExpectation("Epsilon", false), peg$c361 = function () { return Number.EPSILON; }, peg$c362 = "\uD835\uDF00", peg$c363 = peg$literalExpectation("\uD835\uDF00", false), peg$c364 = "\u03B5", peg$c365 = peg$literalExpectation("\u03B5", false), peg$c366 = "Pi", peg$c367 = peg$literalExpectation("Pi", false), peg$c368 = function () { return Math.PI; }, peg$c369 = "\uD835\uDF0B", peg$c370 = peg$literalExpectation("\uD835\uDF0B", false), peg$c371 = "\u03C0", peg$c372 = peg$literalExpectation("\u03C0", false), peg$c373 = "EulerNumber", peg$c374 = peg$literalExpectation("EulerNumber", false), peg$c375 = function () { return Math.E; }, peg$c376 = "E", peg$c377 = peg$literalExpectation("E", false), peg$c378 = "e", peg$c379 = peg$literalExpectation("e", false), peg$c380 = "\u0190", peg$c381 = peg$literalExpectation("\u0190", false), peg$c382 = "\u2107", peg$c383 = peg$literalExpectation("\u2107", false), peg$c384 = "Root2", peg$c385 = peg$literalExpectation("Root2", false), peg$c386 = function () { return Math.SQRT2; }, peg$c387 = "RootHalf", peg$c388 = peg$literalExpectation("RootHalf", false), peg$c389 = function () { return Math.SQRT1_2; }, peg$c390 = "Ln2", peg$c391 = peg$literalExpectation("Ln2", false), peg$c392 = function () { return Math.LN2; }, peg$c393 = "NatLog2", peg$c394 = peg$literalExpectation("NatLog2", false), peg$c395 = "Ln10", peg$c396 = peg$literalExpectation("Ln10", false), peg$c397 = function () { return Math.LN10; }, peg$c398 = "NatLog10", peg$c399 = peg$literalExpectation("NatLog10", false), peg$c400 = "Log2E", peg$c401 = peg$literalExpectation("Log2E", false), peg$c402 = function () { return Math.LOG2E; }, peg$c403 = "Log10E", peg$c404 = peg$literalExpectation("Log10E", false), peg$c405 = function () { return Math.LOG10E; }, peg$c406 = "MaxSafeInt", peg$c407 = peg$literalExpectation("MaxSafeInt", false), peg$c408 = function () { return Number.MAX_SAFE_INTEGER; }, peg$c409 = "MinSafeInt", peg$c410 = peg$literalExpectation("MinSafeInt", false), peg$c411 = function () { return Number.MIN_SAFE_INTEGER; }, peg$c412 = "MaxPosNum", peg$c413 = peg$literalExpectation("MaxPosNum", false), peg$c414 = function () { return Number.MAX_VALUE; }, peg$c415 = "MinPosNum", peg$c416 = peg$literalExpectation("MinPosNum", false), peg$c417 = function () { return Number.MIN_VALUE; }, peg$c418 = "Phi", peg$c419 = peg$literalExpectation("Phi", false), peg$c420 = function () { return 1.61803398874989484820; }, peg$c421 = "\uD835\uDF11", peg$c422 = peg$literalExpectation("\uD835\uDF11", false), peg$c423 = "\uD835\uDF19", peg$c424 = peg$literalExpectation("\uD835\uDF19", false), peg$c425 = "\u03D5", peg$c426 = peg$literalExpectation("\u03D5", false), peg$c427 = "\u03C6", peg$c428 = peg$literalExpectation("\u03C6", false), peg$c429 = "EulerConstant", peg$c430 = peg$literalExpectation("EulerConstant", false), peg$c431 = function () { return 0.57721566490153286060; }, peg$c432 = "\u03B3", peg$c433 = peg$literalExpectation("\u03B3", false), peg$c434 = "\uD835\uDEFE", peg$c435 = peg$literalExpectation("\uD835\uDEFE", false), peg$c436 = peg$literalExpectation("e", true), peg$c437 = /^[+\-]/, peg$c438 = peg$classExpectation(["+", "-"], false, false), peg$c439 = "0x", peg$c440 = peg$literalExpectation("0x", true), peg$c441 = function (digits) { return parseInt(digits, 16); }, peg$c442 = "0b", peg$c443 = peg$literalExpectation("0b", true), peg$c444 = function (digits) { return parseInt(digits, 2); }, peg$c445 = "0o", peg$c446 = peg$literalExpectation("0o", true), peg$c447 = function (digits) { return parseInt(digits, 8); }, peg$c448 = function (major, minor, patch) { return { major: parseInt(major, 10), minor: parseInt(minor, 10), patch: parseInt(patch, 10), full: text() }; }, peg$c459 = "http://", peg$c460 = peg$literalExpectation("http://", false), peg$c461 = "https://", peg$c462 = peg$literalExpectation("https://", false), peg$c463 = /^[a-zA-Z0-9!*'():;@&=+$,\/?#[\]_.~\-]/, peg$c464 = peg$classExpectation([["a", "z"], ["A", "Z"], ["0", "9"], "!", "*", "'", "(", ")", ":", ";", "@", "&", "=", "+", "$", ",", "/", "?", "#", "[", "]", "_", ".", "~", "-"], false, false), peg$c465 = function (protocol) { return text(); }, peg$c466 = "aliceblue", peg$c467 = peg$literalExpectation("aliceblue", false), peg$c468 = function () { return '#f0f8ffff'; }, peg$c469 = "AliceBlue", peg$c470 = peg$literalExpectation("AliceBlue", false), peg$c471 = "antiquewhite", peg$c472 = peg$literalExpectation("antiquewhite", false), peg$c473 = function () { return '#faebd7ff'; }, peg$c474 = "AntiqueWhite", peg$c475 = peg$literalExpectation("AntiqueWhite", false), peg$c476 = "aquamarine", peg$c477 = peg$literalExpectation("aquamarine", false), peg$c478 = function () { return '#7fffd4ff'; }, peg$c479 = "Aquamarine", peg$c480 = peg$literalExpectation("Aquamarine", false), peg$c481 = "aqua", peg$c482 = peg$literalExpectation("aqua", false), peg$c483 = function () { return '#00ffffff'; }, peg$c484 = "Aqua", peg$c485 = peg$literalExpectation("Aqua", false), peg$c486 = "azure", peg$c487 = peg$literalExpectation("azure", false), peg$c488 = function () { return '#f0ffffff'; }, peg$c489 = "Azure", peg$c490 = peg$literalExpectation("Azure", false), peg$c491 = "beige", peg$c492 = peg$literalExpectation("beige", false), peg$c493 = function () { return '#f5f5dcff'; }, peg$c494 = "Beige", peg$c495 = peg$literalExpectation("Beige", false), peg$c496 = "bisque", peg$c497 = peg$literalExpectation("bisque", false), peg$c498 = function () { return '#ffe4c4ff'; }, peg$c499 = "Bisque", peg$c500 = peg$literalExpectation("Bisque", false), peg$c501 = "black", peg$c502 = peg$literalExpectation("black", false), peg$c503 = function () { return '#000000ff'; }, peg$c504 = "Black", peg$c505 = peg$literalExpectation("Black", false), peg$c506 = "blanchedalmond", peg$c507 = peg$literalExpectation("blanchedalmond", false), peg$c508 = function () { return '#ffebcdff'; }, peg$c509 = "BlanchedAlmond", peg$c510 = peg$literalExpectation("BlanchedAlmond", false), peg$c511 = "blueviolet", peg$c512 = peg$literalExpectation("blueviolet", false), peg$c513 = function () { return '#8a2be2ff'; }, peg$c514 = "BlueViolet", peg$c515 = peg$literalExpectation("BlueViolet", false), peg$c516 = "blue", peg$c517 = peg$literalExpectation("blue", false), peg$c518 = function () { return '#0000ffff'; }, peg$c519 = "Blue", peg$c520 = peg$literalExpectation("Blue", false), peg$c521 = "brown", peg$c522 = peg$literalExpectation("brown", false), peg$c523 = function () { return '#a52a2aff'; }, peg$c524 = "Brown", peg$c525 = peg$literalExpectation("Brown", false), peg$c526 = "burlywood", peg$c527 = peg$literalExpectation("burlywood", false), peg$c528 = function () { return '#deb887ff'; }, peg$c529 = "BurlyWood", peg$c530 = peg$literalExpectation("BurlyWood", false), peg$c531 = "cadetblue", peg$c532 = peg$literalExpectation("cadetblue", false), peg$c533 = function () { return '#5f9ea0ff'; }, peg$c534 = "CadetBlue", peg$c535 = peg$literalExpectation("CadetBlue", false), peg$c536 = "chartreuse", peg$c537 = peg$literalExpectation("chartreuse", false), peg$c538 = function () { return '#7fff00ff'; }, peg$c539 = "Chartreuse", peg$c540 = peg$literalExpectation("Chartreuse", false), peg$c541 = "chocolate", peg$c542 = peg$literalExpectation("chocolate", false), peg$c543 = function () { return '#d2691eff'; }, peg$c544 = "Chocolate", peg$c545 = peg$literalExpectation("Chocolate", false), peg$c546 = "coral", peg$c547 = peg$literalExpectation("coral", false), peg$c548 = function () { return '#ff7f50ff'; }, peg$c549 = "Coral", peg$c550 = peg$literalExpectation("Coral", false), peg$c551 = "cornflowerblue", peg$c552 = peg$literalExpectation("cornflowerblue", false), peg$c553 = function () { return '#6495edff'; }, peg$c554 = "CornflowerBlue", peg$c555 = peg$literalExpectation("CornflowerBlue", false), peg$c556 = "cornsilk", peg$c557 = peg$literalExpectation("cornsilk", false), peg$c558 = function () { return '#fff8dcff'; }, peg$c559 = "Cornsilk", peg$c560 = peg$literalExpectation("Cornsilk", false), peg$c561 = "crimson", peg$c562 = peg$literalExpectation("crimson", false), peg$c563 = function () { return '#dc143cff'; }, peg$c564 = "Crimson", peg$c565 = peg$literalExpectation("Crimson", false), peg$c566 = "cyan", peg$c567 = peg$literalExpectation("cyan", false), peg$c568 = "Cyan", peg$c569 = peg$literalExpectation("Cyan", false), peg$c570 = "darkblue", peg$c571 = peg$literalExpectation("darkblue", false), peg$c572 = function () { return '#00008bff'; }, peg$c573 = "DarkBlue", peg$c574 = peg$literalExpectation("DarkBlue", false), peg$c575 = "darkcyan", peg$c576 = peg$literalExpectation("darkcyan", false), peg$c577 = function () { return '#008b8bff'; }, peg$c578 = "DarkCyan", peg$c579 = peg$literalExpectation("DarkCyan", false), peg$c580 = "darkgoldenrod", peg$c581 = peg$literalExpectation("darkgoldenrod", false), peg$c582 = function () { return '#b8860bff'; }, peg$c583 = "DarkGoldenRod", peg$c584 = peg$literalExpectation("DarkGoldenRod", false), peg$c585 = "darkgray", peg$c586 = peg$literalExpectation("darkgray", false), peg$c587 = function () { return '#a9a9a9ff'; }, peg$c588 = "DarkGray", peg$c589 = peg$literalExpectation("DarkGray", false), peg$c590 = "darkgrey", peg$c591 = peg$literalExpectation("darkgrey", false), peg$c592 = "DarkGrey", peg$c593 = peg$literalExpectation("DarkGrey", false), peg$c594 = "darkgreen", peg$c595 = peg$literalExpectation("darkgreen", false), peg$c596 = function () { return '#006400ff'; }, peg$c597 = "DarkGreen", peg$c598 = peg$literalExpectation("DarkGreen", false), peg$c599 = "darkkhaki", peg$c600 = peg$literalExpectation("darkkhaki", false), peg$c601 = function () { return '#bdb76bff'; }, peg$c602 = "DarkKhaki", peg$c603 = peg$literalExpectation("DarkKhaki", false), peg$c604 = "darkmagenta", peg$c605 = peg$literalExpectation("darkmagenta", false), peg$c606 = function () { return '#8b008bff'; }, peg$c607 = "DarkMagenta", peg$c608 = peg$literalExpectation("DarkMagenta", false), peg$c609 = "darkolivegreen", peg$c610 = peg$literalExpectation("darkolivegreen", false), peg$c611 = function () { return '#556b2fff'; }, peg$c612 = "DarkOliveGreen", peg$c613 = peg$literalExpectation("DarkOliveGreen", false), peg$c614 = "darkorange", peg$c615 = peg$literalExpectation("darkorange", false), peg$c616 = function () { return '#ff8c00ff'; }, peg$c617 = "Darkorange", peg$c618 = peg$literalExpectation("Darkorange", false), peg$c619 = "darkorchid", peg$c620 = peg$literalExpectation("darkorchid", false), peg$c621 = function () { return '#9932ccff'; }, peg$c622 = "DarkOrchid", peg$c623 = peg$literalExpectation("DarkOrchid", false), peg$c624 = "darkred", peg$c625 = peg$literalExpectation("darkred", false), peg$c626 = function () { return '#8b0000ff'; }, peg$c627 = "DarkRed", peg$c628 = peg$literalExpectation("DarkRed", false), peg$c629 = "darksalmon", peg$c630 = peg$literalExpectation("darksalmon", false), peg$c631 = function () { return '#e9967aff'; }, peg$c632 = "DarkSalmon", peg$c633 = peg$literalExpectation("DarkSalmon", false), peg$c634 = "darkseagreen", peg$c635 = peg$literalExpectation("darkseagreen", false), peg$c636 = function () { return '#8fbc8fff'; }, peg$c637 = "DarkSeaGreen", peg$c638 = peg$literalExpectation("DarkSeaGreen", false), peg$c639 = "darkslateblue", peg$c640 = peg$literalExpectation("darkslateblue", false), peg$c641 = function () { return '#483d8bff'; }, peg$c642 = "DarkSlateBlue", peg$c643 = peg$literalExpectation("DarkSlateBlue", false), peg$c644 = "darkslategray", peg$c645 = peg$literalExpectation("darkslategray", false), peg$c646 = function () { return '#2f4f4fff'; }, peg$c647 = "DarkSlateGray", peg$c648 = peg$literalExpectation("DarkSlateGray", false), peg$c649 = "darkslategrey", peg$c650 = peg$literalExpectation("darkslategrey", false), peg$c651 = "DarkSlateGrey", peg$c652 = peg$literalExpectation("DarkSlateGrey", false), peg$c653 = "darkturquoise", peg$c654 = peg$literalExpectation("darkturquoise", false), peg$c655 = function () { return '#00ced1ff'; }, peg$c656 = "DarkTurquoise", peg$c657 = peg$literalExpectation("DarkTurquoise", false), peg$c658 = "darkviolet", peg$c659 = peg$literalExpectation("darkviolet", false), peg$c660 = function () { return '#9400d3ff'; }, peg$c661 = "DarkViolet", peg$c662 = peg$literalExpectation("DarkViolet", false), peg$c663 = "deeppink", peg$c664 = peg$literalExpectation("deeppink", false), peg$c665 = function () { return '#ff1493ff'; }, peg$c666 = "DeepPink", peg$c667 = peg$literalExpectation("DeepPink", false), peg$c668 = "deepskyblue", peg$c669 = peg$literalExpectation("deepskyblue", false), peg$c670 = function () { return '#00bfffff'; }, peg$c671 = "DeepSkyBlue", peg$c672 = peg$literalExpectation("DeepSkyBlue", false), peg$c673 = "dimgray", peg$c674 = peg$literalExpectation("dimgray", false), peg$c675 = function () { return '#696969ff'; }, peg$c676 = "DimGray", peg$c677 = peg$literalExpectation("DimGray", false), peg$c678 = "dimgrey", peg$c679 = peg$literalExpectation("dimgrey", false), peg$c680 = "DimGrey", peg$c681 = peg$literalExpectation("DimGrey", false), peg$c682 = "dodgerblue", peg$c683 = peg$literalExpectation("dodgerblue", false), peg$c684 = function () { return '#1e90ffff'; }, peg$c685 = "DodgerBlue", peg$c686 = peg$literalExpectation("DodgerBlue", false), peg$c687 = "firebrick", peg$c688 = peg$literalExpectation("firebrick", false), peg$c689 = function () { return '#b22222ff'; }, peg$c690 = "FireBrick", peg$c691 = peg$literalExpectation("FireBrick", false), peg$c692 = "floralwhite", peg$c693 = peg$literalExpectation("floralwhite", false), peg$c694 = function () { return '#fffaf0ff'; }, peg$c695 = "FloralWhite", peg$c696 = peg$literalExpectation("FloralWhite", false), peg$c697 = "forestgreen", peg$c698 = peg$literalExpectation("forestgreen", false), peg$c699 = function () { return '#228b22ff'; }, peg$c700 = "ForestGreen", peg$c701 = peg$literalExpectation("ForestGreen", false), peg$c702 = "fuchsia", peg$c703 = peg$literalExpectation("fuchsia", false), peg$c704 = function () { return '#ff00ffff'; }, peg$c705 = "Fuchsia", peg$c706 = peg$literalExpectation("Fuchsia", false), peg$c707 = "gainsboro", peg$c708 = peg$literalExpectation("gainsboro", false), peg$c709 = function () { return '#dcdcdcff'; }, peg$c710 = "Gainsboro", peg$c711 = peg$literalExpectation("Gainsboro", false), peg$c712 = "ghostwhite", peg$c713 = peg$literalExpectation("ghostwhite", false), peg$c714 = function () { return '#f8f8ffff'; }, peg$c715 = "GhostWhite", peg$c716 = peg$literalExpectation("GhostWhite", false), peg$c717 = "goldenrod", peg$c718 = peg$literalExpectation("goldenrod", false), peg$c719 = function () { return '#daa520ff'; }, peg$c720 = "GoldenRod", peg$c721 = peg$literalExpectation("GoldenRod", false), peg$c722 = "gold", peg$c723 = peg$literalExpectation("gold", false), peg$c724 = function () { return '#ffd700ff'; }, peg$c725 = "Gold", peg$c726 = peg$literalExpectation("Gold", false), peg$c727 = "gray", peg$c728 = peg$literalExpectation("gray", false), peg$c729 = function () { return '#808080ff'; }, peg$c730 = "Gray", peg$c731 = peg$literalExpectation("Gray", false), peg$c732 = "grey", peg$c733 = peg$literalExpectation("grey", false), peg$c734 = "Grey", peg$c735 = peg$literalExpectation("Grey", false), peg$c736 = "greenyellow", peg$c737 = peg$literalExpectation("greenyellow", false), peg$c738 = function () { return '#adff2fff'; }, peg$c739 = "GreenYellow", peg$c740 = peg$literalExpectation("GreenYellow", false), peg$c741 = "green", peg$c742 = peg$literalExpectation("green", false), peg$c743 = function () { return '#008000ff'; }, peg$c744 = "Green", peg$c745 = peg$literalExpectation("Green", false), peg$c746 = "honeydew", peg$c747 = peg$literalExpectation("honeydew", false), peg$c748 = function () { return '#f0fff0ff'; }, peg$c749 = "HoneyDew", peg$c750 = peg$literalExpectation("HoneyDew", false), peg$c751 = "hotpink", peg$c752 = peg$literalExpectation("hotpink", false), peg$c753 = function () { return '#ff69b4ff'; }, peg$c754 = "HotPink", peg$c755 = peg$literalExpectation("HotPink", false), peg$c756 = "indianred", peg$c757 = peg$literalExpectation("indianred", false), peg$c758 = function () { return '#cd5c5cff'; }, peg$c759 = "IndianRed", peg$c760 = peg$literalExpectation("IndianRed", false), peg$c761 = "indigo", peg$c762 = peg$literalExpectation("indigo", false), peg$c763 = function () { return '#4b0082ff'; }, peg$c764 = "Indigo", peg$c765 = peg$literalExpectation("Indigo", false), peg$c766 = "ivory", peg$c767 = peg$literalExpectation("ivory", false), peg$c768 = function () { return '#fffff0ff'; }, peg$c769 = "Ivory", peg$c770 = peg$literalExpectation("Ivory", false), peg$c771 = "khaki", peg$c772 = peg$literalExpectation("khaki", false), peg$c773 = function () { return '#f0e68cff'; }, peg$c774 = "Khaki", peg$c775 = peg$literalExpectation("Khaki", false), peg$c776 = "lavenderblush", peg$c777 = peg$literalExpectation("lavenderblush", false), peg$c778 = function () { return '#fff0f5ff'; }, peg$c779 = "LavenderBlush", peg$c780 = peg$literalExpectation("LavenderBlush", false), peg$c781 = "lavender", peg$c782 = peg$literalExpectation("lavender", false), peg$c783 = function () { return '#e6e6faff'; }, peg$c784 = "Lavender", peg$c785 = peg$literalExpectation("Lavender", false), peg$c786 = "lawngreen", peg$c787 = peg$literalExpectation("lawngreen", false), peg$c788 = function () { return '#7cfc00ff'; }, peg$c789 = "LawnGreen", peg$c790 = peg$literalExpectation("LawnGreen", false), peg$c791 = "lemonchiffon", peg$c792 = peg$literalExpectation("lemonchiffon", false), peg$c793 = function () { return '#fffacdff'; }, peg$c794 = "LemonChiffon", peg$c795 = peg$literalExpectation("LemonChiffon", false), peg$c796 = "lightblue", peg$c797 = peg$literalExpectation("lightblue", false), peg$c798 = function () { return '#add8e6ff'; }, peg$c799 = "LightBlue", peg$c800 = peg$literalExpectation("LightBlue", false), peg$c801 = "lightcoral", peg$c802 = peg$literalExpectation("lightcoral", false), peg$c803 = function () { return '#f08080ff'; }, peg$c804 = "LightCoral", peg$c805 = peg$literalExpectation("LightCoral", false), peg$c806 = "lightcyan", peg$c807 = peg$literalExpectation("lightcyan", false), peg$c808 = function () { return '#e0ffffff'; }, peg$c809 = "LightCyan", peg$c810 = peg$literalExpectation("LightCyan", false), peg$c811 = "lightgoldenrodyellow", peg$c812 = peg$literalExpectation("lightgoldenrodyellow", false), peg$c813 = function () { return '#fafad2ff'; }, peg$c814 = "LightGoldenRodYellow", peg$c815 = peg$literalExpectation("LightGoldenRodYellow", false), peg$c816 = "lightgray", peg$c817 = peg$literalExpectation("lightgray", false), peg$c818 = function () { return '#d3d3d3ff'; }, peg$c819 = "LightGray", peg$c820 = peg$literalExpectation("LightGray", false), peg$c821 = "lightgrey", peg$c822 = peg$literalExpectation("lightgrey", false), peg$c823 = "LightGrey", peg$c824 = peg$literalExpectation("LightGrey", false), peg$c825 = "lightgreen", peg$c826 = peg$literalExpectation("lightgreen", false), peg$c827 = function () { return '#90ee90ff'; }, peg$c828 = "LightGreen", peg$c829 = peg$literalExpectation("LightGreen", false), peg$c830 = "lightpink", peg$c831 = peg$literalExpectation("lightpink", false), peg$c832 = function () { return '#ffb6c1ff'; }, peg$c833 = "LightPink", peg$c834 = peg$literalExpectation("LightPink", false), peg$c835 = "lightsalmon", peg$c836 = peg$literalExpectation("lightsalmon", false), peg$c837 = function () { return '#ffa07aff'; }, peg$c838 = "LightSalmon", peg$c839 = peg$literalExpectation("LightSalmon", false), peg$c840 = "lightseagreen", peg$c841 = peg$literalExpectation("lightseagreen", false), peg$c842 = function () { return '#20b2aaff'; }, peg$c843 = "LightSeaGreen", peg$c844 = peg$literalExpectation("LightSeaGreen", false), peg$c845 = "lightskyblue", peg$c846 = peg$literalExpectation("lightskyblue", false), peg$c847 = function () { return '#87cefaff'; }, peg$c848 = "LightSkyBlue", peg$c849 = peg$literalExpectation("LightSkyBlue", false), peg$c850 = "lightslategray", peg$c851 = peg$literalExpectation("lightslategray", false), peg$c852 = function () { return '#778899ff'; }, peg$c853 = "LightSlateGray", peg$c854 = peg$literalExpectation("LightSlateGray", false), peg$c855 = "lightslategrey", peg$c856 = peg$literalExpectation("lightslategrey", false), peg$c857 = "LightSlateGrey", peg$c858 = peg$literalExpectation("LightSlateGrey", false), peg$c859 = "lightsteelblue", peg$c860 = peg$literalExpectation("lightsteelblue", false), peg$c861 = function () { return '#b0c4deff'; }, peg$c862 = "LightSteelBlue", peg$c863 = peg$literalExpectation("LightSteelBlue", false), peg$c864 = "lightyellow", peg$c865 = peg$literalExpectation("lightyellow", false), peg$c866 = function () { return '#ffffe0ff'; }, peg$c867 = "LightYellow", peg$c868 = peg$literalExpectation("LightYellow", false), peg$c869 = "limegreen", peg$c870 = peg$literalExpectation("limegreen", false), peg$c871 = function () { return '#32cd32ff'; }, peg$c872 = "LimeGreen", peg$c873 = peg$literalExpectation("LimeGreen", false), peg$c874 = "lime", peg$c875 = peg$literalExpectation("lime", false), peg$c876 = function () { return '#00ff00ff'; }, peg$c877 = "Lime", peg$c878 = peg$literalExpectation("Lime", false), peg$c879 = "linen", peg$c880 = peg$literalExpectation("linen", false), peg$c881 = function () { return '#faf0e6ff'; }, peg$c882 = "Linen", peg$c883 = peg$literalExpectation("Linen", false), peg$c884 = "magenta", peg$c885 = peg$literalExpectation("magenta", false), peg$c886 = "Magenta", peg$c887 = peg$literalExpectation("Magenta", false), peg$c888 = "maroon", peg$c889 = peg$literalExpectation("maroon", false), peg$c890 = function () { return '#800000ff'; }, peg$c891 = "Maroon", peg$c892 = peg$literalExpectation("Maroon", false), peg$c893 = "mediumaquamarine", peg$c894 = peg$literalExpectation("mediumaquamarine", false), peg$c895 = function () { return '#66cdaaff'; }, peg$c896 = "MediumAquaMarine", peg$c897 = peg$literalExpectation("MediumAquaMarine", false), peg$c898 = "mediumblue", peg$c899 = peg$literalExpectation("mediumblue", false), peg$c900 = function () { return '#0000cdff'; }, peg$c901 = "MediumBlue", peg$c902