ohm-js 16.1.1 → 16.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/main.js.map DELETED
@@ -1 +0,0 @@
1
- {"mappings":"2mBAwBSA,EAAQC,EAAOC,EAAMC,GAC5B,IAPA,SAEmBA,GACnB,MAAgB,gBAATA,GAAmC,WAATA,GAA8B,SAATA,EAIjDC,CAAYD,GACf,MAAM,IAAIE,MAAM,yBAA2BF,GAE7CG,KAAKL,MAAQA,EACbK,KAAKJ,KAAOA,EACZI,KAAKH,KAAOA,EACZG,KAAKC,QAAS,EAGhBP,EAAQQ,UAAUC,SAAW,WAC3B,OAAOH,KAAKL,OAGdD,EAAQQ,UAAUE,QAAU,WAC1B,OAAOJ,KAAKJ,MAGdF,EAAQQ,UAAUG,QAAU,WAC1B,OAAOL,KAAKH,MAGdH,EAAQQ,UAAUI,cAAgB,WAChC,MAAqB,gBAAdN,KAAKH,MAGdH,EAAQQ,UAAUK,iBAAmB,WACnC,MAAqB,WAAdP,KAAKH,MAGdH,EAAQQ,UAAUM,OAAS,WACzB,MAAqB,SAAdR,KAAKH,MAGdH,EAAQQ,UAAUO,SAAW,WAC3B,OAAOT,KAAKC,QAGdP,EAAQQ,UAAUQ,WAAa,WAC7BV,KAAKC,QAAS,GAGhBP,EAAQQ,UAAUS,YAAc,WAC9BX,KAAKC,QAAS,GAGhBP,EAAQQ,UAAUU,SAAW,SAASC,GACpC,OACEb,KAAKI,YAAcS,EAAKT,WACxBJ,KAAKH,OAASgB,EAAKhB,QACjBG,KAAKS,YAAeT,KAAKS,YAAcI,EAAKJ,aAIlDf,EAAQQ,UAAUY,SAAW,WAC3B,MAAqB,WAAdd,KAAKH,KAAoBkB,KAAKC,UAAUhB,KAAKI,WAAaJ,KAAKI,WAGxEV,EAAQQ,UAAUe,MAAQ,WACxB,MAAMC,EAAU,IAAIxB,EAAQM,KAAKL,MAAOK,KAAKJ,KAAMI,KAAKH,MAI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AK,CAAC,WAAW,CAACA,eAAiB,CAAC,KAAK,OAAO,KAAK,CAAC,WAAW,CAACA,eAAiB,CAAC,KAAK,OAAO,cPqVholBsT,EAAe4O,WAAavH,GAAa7G,EAAA,SACzCiE,EAAAxC,sBAA8BoF,GAAYK","sources":["packages/ohm-js/src/Failure.js","packages/ohm-js/src/common.js","packages/ohm-js/src/nodes.js","packages/ohm-js/src/pexprs.js","packages/ohm-js/src/CaseInsensitiveTerminal.js","packages/ohm-js/third_party/UnicodeCategories.js","packages/ohm-js/src/pexprs-allowsSkippingPrecedingSpace.js","packages/ohm-js/src/pexprs-assertAllApplicationsAreValid.js","packages/ohm-js/src/Namespace.js","packages/ohm-js/src/errors.js","packages/ohm-js/src/util.js","packages/ohm-js/src/pexprs-assertChoicesHaveUniformArity.js","packages/ohm-js/src/pexprs-assertIteratedExprsAreNotNullable.js","packages/ohm-js/src/Interval.js","packages/ohm-js/src/Trace.js","packages/ohm-js/src/pexprs-eval.js","packages/ohm-js/src/pexprs-outputRecipe.js","packages/ohm-js/src/pexprs-getArity.js","packages/ohm-js/src/pexprs-introduceParams.js","packages/ohm-js/src/pexprs-isNullable.js","packages/ohm-js/src/pexprs-substituteParams.js","packages/ohm-js/src/pexprs-toArgumentNameList.js","packages/ohm-js/src/pexprs-toDisplayString.js","packages/ohm-js/src/pexprs-toFailure.js","packages/ohm-js/src/pexprs-toString.js","packages/ohm-js/src/InputStream.js","packages/ohm-js/src/MatchResult.js","packages/ohm-js/src/PosInfo.js","packages/ohm-js/src/MatchState.js","packages/ohm-js/src/Matcher.js","packages/ohm-js/src/Semantics.js","packages/ohm-js/dist/operations-and-attributes.js","packages/ohm-js/src/Grammar.js","packages/ohm-js/src/GrammarDecl.js","packages/ohm-js/src/Builder.js","packages/ohm-js/src/main.js","packages/ohm-js/package.json","packages/ohm-js/src/version.js","packages/ohm-js/extras/index.js","packages/ohm-js/extras/VisitorFamily.js","packages/ohm-js/extras/semantics-toAST.js","packages/ohm-js/dist/built-in-rules.js","packages/ohm-js/dist/ohm-grammar.js"],"sourcesContent":["'use strict';\n\n// --------------------------------------------------------------------\n// Private stuff\n// --------------------------------------------------------------------\n\n/*\n `Failure`s represent expressions that weren't matched while parsing. They are used to generate\n error messages automatically. The interface of `Failure`s includes the collowing methods:\n\n - getText() : String\n - getType() : String (one of {\"description\", \"string\", \"code\"})\n - isDescription() : bool\n - isStringTerminal() : bool\n - isCode() : bool\n - isFluffy() : bool\n - makeFluffy() : void\n - subsumes(Failure) : bool\n*/\n\nfunction isValidType(type) {\n return type === 'description' || type === 'string' || type === 'code';\n}\n\nfunction Failure(pexpr, text, type) {\n if (!isValidType(type)) {\n throw new Error('invalid Failure type: ' + type);\n }\n this.pexpr = pexpr;\n this.text = text;\n this.type = type;\n this.fluffy = false;\n}\n\nFailure.prototype.getPExpr = function() {\n return this.pexpr;\n};\n\nFailure.prototype.getText = function() {\n return this.text;\n};\n\nFailure.prototype.getType = function() {\n return this.type;\n};\n\nFailure.prototype.isDescription = function() {\n return this.type === 'description';\n};\n\nFailure.prototype.isStringTerminal = function() {\n return this.type === 'string';\n};\n\nFailure.prototype.isCode = function() {\n return this.type === 'code';\n};\n\nFailure.prototype.isFluffy = function() {\n return this.fluffy;\n};\n\nFailure.prototype.makeFluffy = function() {\n this.fluffy = true;\n};\n\nFailure.prototype.clearFluffy = function() {\n this.fluffy = false;\n};\n\nFailure.prototype.subsumes = function(that) {\n return (\n this.getText() === that.getText() &&\n this.type === that.type &&\n (!this.isFluffy() || (this.isFluffy() && that.isFluffy()))\n );\n};\n\nFailure.prototype.toString = function() {\n return this.type === 'string' ? JSON.stringify(this.getText()) : this.getText();\n};\n\nFailure.prototype.clone = function() {\n const failure = new Failure(this.pexpr, this.text, this.type);\n if (this.isFluffy()) {\n failure.makeFluffy();\n }\n return failure;\n};\n\nFailure.prototype.toKey = function() {\n return this.toString() + '#' + this.type;\n};\n\n// --------------------------------------------------------------------\n// Exports\n// --------------------------------------------------------------------\n\nmodule.exports = Failure;\n","'use strict';\n\n// --------------------------------------------------------------------\n// Private Stuff\n// --------------------------------------------------------------------\n\n// Helpers\n\nconst escapeStringFor = {};\nfor (let c = 0; c < 128; c++) {\n escapeStringFor[c] = String.fromCharCode(c);\n}\nescapeStringFor[\"'\".charCodeAt(0)] = \"\\\\'\";\nescapeStringFor['\"'.charCodeAt(0)] = '\\\\\"';\nescapeStringFor['\\\\'.charCodeAt(0)] = '\\\\\\\\';\nescapeStringFor['\\b'.charCodeAt(0)] = '\\\\b';\nescapeStringFor['\\f'.charCodeAt(0)] = '\\\\f';\nescapeStringFor['\\n'.charCodeAt(0)] = '\\\\n';\nescapeStringFor['\\r'.charCodeAt(0)] = '\\\\r';\nescapeStringFor['\\t'.charCodeAt(0)] = '\\\\t';\nescapeStringFor['\\u000b'.charCodeAt(0)] = '\\\\v';\n\n// --------------------------------------------------------------------\n// Exports\n// --------------------------------------------------------------------\n\nexports.abstract = function(optMethodName) {\n const methodName = optMethodName || '';\n return function() {\n throw new Error(\n 'this method ' +\n methodName +\n ' is abstract! ' +\n '(it has no implementation in class ' +\n this.constructor.name +\n ')'\n );\n };\n};\n\nexports.assert = function(cond, message) {\n if (!cond) {\n throw new Error(message);\n }\n};\n\n// Define a lazily-computed, non-enumerable property named `propName`\n// on the object `obj`. `getterFn` will be called to compute the value the\n// first time the property is accessed.\nexports.defineLazyProperty = function(obj, propName, getterFn) {\n let memo;\n Object.defineProperty(obj, propName, {\n get() {\n if (!memo) {\n memo = getterFn.call(this);\n }\n return memo;\n },\n });\n};\n\nexports.clone = function(obj) {\n if (obj) {\n return Object.assign({}, obj);\n }\n return obj;\n};\n\nexports.repeatFn = function(fn, n) {\n const arr = [];\n while (n-- > 0) {\n arr.push(fn());\n }\n return arr;\n};\n\nexports.repeatStr = function(str, n) {\n return new Array(n + 1).join(str);\n};\n\nexports.repeat = function(x, n) {\n return exports.repeatFn(() => x, n);\n};\n\nexports.getDuplicates = function(array) {\n const duplicates = [];\n for (let idx = 0; idx < array.length; idx++) {\n const x = array[idx];\n if (array.lastIndexOf(x) !== idx && duplicates.indexOf(x) < 0) {\n duplicates.push(x);\n }\n }\n return duplicates;\n};\n\nexports.copyWithoutDuplicates = function(array) {\n const noDuplicates = [];\n array.forEach(entry => {\n if (noDuplicates.indexOf(entry) < 0) {\n noDuplicates.push(entry);\n }\n });\n return noDuplicates;\n};\n\nexports.isSyntactic = function(ruleName) {\n const firstChar = ruleName[0];\n return firstChar === firstChar.toUpperCase();\n};\n\nexports.isLexical = function(ruleName) {\n return !exports.isSyntactic(ruleName);\n};\n\nexports.padLeft = function(str, len, optChar) {\n const ch = optChar || ' ';\n if (str.length < len) {\n return exports.repeatStr(ch, len - str.length) + str;\n }\n return str;\n};\n\n// StringBuffer\n\nexports.StringBuffer = function() {\n this.strings = [];\n};\n\nexports.StringBuffer.prototype.append = function(str) {\n this.strings.push(str);\n};\n\nexports.StringBuffer.prototype.contents = function() {\n return this.strings.join('');\n};\n\n// Character escaping and unescaping\n\nexports.escapeChar = function(c, optDelim) {\n const charCode = c.charCodeAt(0);\n if ((c === '\"' || c === \"'\") && optDelim && c !== optDelim) {\n return c;\n } else if (charCode < 128) {\n return escapeStringFor[charCode];\n } else if (128 <= charCode && charCode < 256) {\n return '\\\\x' + exports.padLeft(charCode.toString(16), 2, '0');\n } else {\n return '\\\\u' + exports.padLeft(charCode.toString(16), 4, '0');\n }\n};\n\nexports.unescapeChar = function(s) {\n if (s.charAt(0) === '\\\\') {\n switch (s.charAt(1)) {\n case 'b':\n return '\\b';\n case 'f':\n return '\\f';\n case 'n':\n return '\\n';\n case 'r':\n return '\\r';\n case 't':\n return '\\t';\n case 'v':\n return '\\v';\n case 'x':\n return String.fromCharCode(parseInt(s.substring(2, 4), 16));\n case 'u':\n return String.fromCharCode(parseInt(s.substring(2, 6), 16));\n default:\n return s.charAt(1);\n }\n } else {\n return s;\n }\n};\n\n// Helper for producing a description of an unknown object in a safe way.\n// Especially useful for error messages where an unexpected type of object was encountered.\nexports.unexpectedObjToString = function(obj) {\n if (obj == null) {\n return String(obj);\n }\n const baseToString = Object.prototype.toString.call(obj);\n try {\n let typeName;\n if (obj.constructor && obj.constructor.name) {\n typeName = obj.constructor.name;\n } else if (baseToString.indexOf('[object ') === 0) {\n typeName = baseToString.slice(8, -1); // Extract e.g. \"Array\" from \"[object Array]\".\n } else {\n typeName = typeof obj;\n }\n return typeName + ': ' + JSON.stringify(String(obj));\n } catch (e) {\n return baseToString;\n }\n};\n","'use strict';\n\nconst common = require('./common');\n\n// Ensures that the deprecation warning for `primitiveValue` only appears once.\nlet didWarnForPrimitiveValue = false;\n\n// --------------------------------------------------------------------\n// Private stuff\n// --------------------------------------------------------------------\n\nclass Node {\n constructor(grammar, ctorName, matchLength) {\n this.grammar = grammar;\n this.ctorName = ctorName;\n this.matchLength = matchLength;\n }\n\n numChildren() {\n return this.children ? this.children.length : 0;\n }\n\n childAt(idx) {\n if (this.children) {\n return this.children[idx];\n }\n }\n\n indexOfChild(arg) {\n return this.children.indexOf(arg);\n }\n\n hasChildren() {\n return this.numChildren() > 0;\n }\n\n hasNoChildren() {\n return !this.hasChildren();\n }\n\n onlyChild() {\n if (this.numChildren() !== 1) {\n throw new Error(\n 'cannot get only child of a node of type ' +\n this.ctorName +\n ' (it has ' +\n this.numChildren() +\n ' children)'\n );\n } else {\n return this.firstChild();\n }\n }\n\n firstChild() {\n if (this.hasNoChildren()) {\n throw new Error(\n 'cannot get first child of a ' + this.ctorName + ' node, which has no children'\n );\n } else {\n return this.childAt(0);\n }\n }\n\n lastChild() {\n if (this.hasNoChildren()) {\n throw new Error(\n 'cannot get last child of a ' + this.ctorName + ' node, which has no children'\n );\n } else {\n return this.childAt(this.numChildren() - 1);\n }\n }\n\n childBefore(child) {\n const childIdx = this.indexOfChild(child);\n if (childIdx < 0) {\n throw new Error('Node.childBefore() called w/ an argument that is not a child');\n } else if (childIdx === 0) {\n throw new Error('cannot get child before first child');\n } else {\n return this.childAt(childIdx - 1);\n }\n }\n\n childAfter(child) {\n const childIdx = this.indexOfChild(child);\n if (childIdx < 0) {\n throw new Error('Node.childAfter() called w/ an argument that is not a child');\n } else if (childIdx === this.numChildren() - 1) {\n throw new Error('cannot get child after last child');\n } else {\n return this.childAt(childIdx + 1);\n }\n }\n\n isTerminal() {\n return false;\n }\n\n isNonterminal() {\n return false;\n }\n\n isIteration() {\n return false;\n }\n\n isOptional() {\n return false;\n }\n\n toJSON() {\n return {[this.ctorName]: this.children};\n }\n}\n\n// Terminals\n\nclass TerminalNode extends Node {\n constructor(grammar, value) {\n const matchLength = value ? value.length : 0;\n super(grammar, '_terminal', matchLength);\n this._value = value;\n }\n\n isTerminal() {\n return true;\n }\n\n toJSON() {\n return {[this.ctorName]: this._value};\n }\n\n get primitiveValue() {\n if (!didWarnForPrimitiveValue) {\n // eslint-disable-next-line no-console\n console.warn(\n 'Warning: primitiveValue is deprecated and will be removed in a future version of Ohm. ' +\n 'Use sourceString instead.'\n );\n didWarnForPrimitiveValue = true;\n }\n\n return this._value;\n }\n}\n\n// Nonterminals\n\nclass NonterminalNode extends Node {\n constructor(grammar, ruleName, children, childOffsets, matchLength) {\n super(grammar, ruleName, matchLength);\n this.children = children;\n this.childOffsets = childOffsets;\n }\n\n isNonterminal() {\n return true;\n }\n\n isLexical() {\n return common.isLexical(this.ctorName);\n }\n\n isSyntactic() {\n return common.isSyntactic(this.ctorName);\n }\n}\n\n// Iterations\n\nclass IterationNode extends Node {\n constructor(grammar, children, childOffsets, matchLength, isOptional) {\n super(grammar, '_iter', matchLength);\n this.children = children;\n this.childOffsets = childOffsets;\n this.optional = isOptional;\n }\n\n isIteration() {\n return true;\n }\n\n isOptional() {\n return this.optional;\n }\n}\n\n// --------------------------------------------------------------------\n// Exports\n// --------------------------------------------------------------------\n\nmodule.exports = {\n Node,\n TerminalNode,\n NonterminalNode,\n IterationNode,\n};\n","'use strict';\n\n// --------------------------------------------------------------------\n// Imports\n// --------------------------------------------------------------------\n\nconst UnicodeCategories = require('../third_party/UnicodeCategories');\nconst common = require('./common');\n\n// --------------------------------------------------------------------\n// Private stuff\n// --------------------------------------------------------------------\n\n// General stuff\n\nclass PExpr {\n constructor() {\n if (this.constructor === PExpr) {\n throw new Error(\"PExpr cannot be instantiated -- it's abstract\");\n }\n }\n\n // Set the `source` property to the interval containing the source for this expression.\n withSource(interval) {\n if (interval) {\n this.source = interval.trimmed();\n }\n return this;\n }\n}\n\n// Any\n\nconst any = Object.create(PExpr.prototype);\n\n// End\n\nconst end = Object.create(PExpr.prototype);\n\n// Terminals\n\nclass Terminal extends PExpr {\n constructor(obj) {\n super();\n this.obj = obj;\n }\n}\n\n// Ranges\n\nclass Range extends PExpr {\n constructor(from, to) {\n super();\n this.from = from;\n this.to = to;\n }\n}\n\n// Parameters\n\nclass Param extends PExpr {\n constructor(index) {\n super();\n this.index = index;\n }\n}\n\n// Alternation\n\nclass Alt extends PExpr {\n constructor(terms) {\n super();\n this.terms = terms;\n }\n}\n\n// Extend is an implementation detail of rule extension\n\nclass Extend extends Alt {\n constructor(superGrammar, name, body) {\n const origBody = superGrammar.rules[name].body;\n super([body, origBody]);\n\n this.superGrammar = superGrammar;\n this.name = name;\n this.body = body;\n }\n}\n\n// Splice is an implementation detail of rule overriding with the `...` operator.\nclass Splice extends Alt {\n constructor(superGrammar, ruleName, beforeTerms, afterTerms) {\n const origBody = superGrammar.rules[ruleName].body;\n super([...beforeTerms, origBody, ...afterTerms]);\n\n this.superGrammar = superGrammar;\n this.ruleName = ruleName;\n this.expansionPos = beforeTerms.length;\n }\n}\n\n// Sequences\n\nclass Seq extends PExpr {\n constructor(factors) {\n super();\n this.factors = factors;\n }\n}\n\n// Iterators and optionals\n\nclass Iter extends PExpr {\n constructor(expr) {\n super();\n this.expr = expr;\n }\n}\n\nclass Star extends Iter {}\nclass Plus extends Iter {}\nclass Opt extends Iter {}\n\nStar.prototype.operator = '*';\nPlus.prototype.operator = '+';\nOpt.prototype.operator = '?';\n\nStar.prototype.minNumMatches = 0;\nPlus.prototype.minNumMatches = 1;\nOpt.prototype.minNumMatches = 0;\n\nStar.prototype.maxNumMatches = Number.POSITIVE_INFINITY;\nPlus.prototype.maxNumMatches = Number.POSITIVE_INFINITY;\nOpt.prototype.maxNumMatches = 1;\n\n// Predicates\n\nclass Not extends PExpr {\n constructor(expr) {\n super();\n this.expr = expr;\n }\n}\n\nclass Lookahead extends PExpr {\n constructor(expr) {\n super();\n this.expr = expr;\n }\n}\n\n// \"Lexification\"\n\nclass Lex extends PExpr {\n constructor(expr) {\n super();\n this.expr = expr;\n }\n}\n\n// Rule application\n\nclass Apply extends PExpr {\n constructor(ruleName, args = []) {\n super();\n this.ruleName = ruleName;\n this.args = args;\n }\n\n isSyntactic() {\n return common.isSyntactic(this.ruleName);\n }\n\n // This method just caches the result of `this.toString()` in a non-enumerable property.\n toMemoKey() {\n if (!this._memoKey) {\n Object.defineProperty(this, '_memoKey', {value: this.toString()});\n }\n return this._memoKey;\n }\n}\n\n// Unicode character\n\nclass UnicodeChar extends PExpr {\n constructor(category) {\n super();\n this.category = category;\n this.pattern = UnicodeCategories[category];\n }\n}\n\n// --------------------------------------------------------------------\n// Exports\n// --------------------------------------------------------------------\n\nexports.PExpr = PExpr;\nexports.any = any;\nexports.end = end;\nexports.Terminal = Terminal;\nexports.Range = Range;\nexports.Param = Param;\nexports.Alt = Alt;\nexports.Extend = Extend;\nexports.Splice = Splice;\nexports.Seq = Seq;\nexports.Iter = Iter;\nexports.Star = Star;\nexports.Plus = Plus;\nexports.Opt = Opt;\nexports.Not = Not;\nexports.Lookahead = Lookahead;\nexports.Lex = Lex;\nexports.Apply = Apply;\nexports.UnicodeChar = UnicodeChar;\n\n// --------------------------------------------------------------------\n// Extensions\n// --------------------------------------------------------------------\n\nrequire('./pexprs-allowsSkippingPrecedingSpace');\nrequire('./pexprs-assertAllApplicationsAreValid');\nrequire('./pexprs-assertChoicesHaveUniformArity');\nrequire('./pexprs-assertIteratedExprsAreNotNullable');\nrequire('./pexprs-eval');\nrequire('./pexprs-getArity');\nrequire('./pexprs-outputRecipe');\nrequire('./pexprs-introduceParams');\nrequire('./pexprs-isNullable');\nrequire('./pexprs-substituteParams');\nrequire('./pexprs-toArgumentNameList');\nrequire('./pexprs-toDisplayString');\nrequire('./pexprs-toFailure');\nrequire('./pexprs-toString');\n","'use strict';\n\n// --------------------------------------------------------------------\n// Imports\n// --------------------------------------------------------------------\n\nconst Failure = require('./Failure');\nconst {TerminalNode} = require('./nodes');\nconst {assert} = require('./common');\nconst {PExpr, Terminal} = require('./pexprs');\n\nclass CaseInsensitiveTerminal extends PExpr {\n constructor(param) {\n super();\n this.obj = param;\n }\n\n _getString(state) {\n const terminal = state.currentApplication().args[this.obj.index];\n assert(terminal instanceof Terminal, 'expected a Terminal expression');\n return terminal.obj;\n }\n\n // Implementation of the PExpr API\n\n allowsSkippingPrecedingSpace() {\n return true;\n }\n\n eval(state) {\n const {inputStream} = state;\n const origPos = inputStream.pos;\n const matchStr = this._getString(state);\n if (!inputStream.matchString(matchStr, true)) {\n state.processFailure(origPos, this);\n return false;\n } else {\n state.pushBinding(new TerminalNode(state.grammar, matchStr), origPos);\n return true;\n }\n }\n\n getArity() {\n return 1;\n }\n\n substituteParams(actuals) {\n return new CaseInsensitiveTerminal(this.obj.substituteParams(actuals));\n }\n\n toDisplayString() {\n return this.obj.toDisplayString() + ' (case-insensitive)';\n }\n\n toFailure(grammar) {\n return new Failure(\n this,\n this.obj.toFailure(grammar) + ' (case-insensitive)',\n 'description'\n );\n }\n\n _isNullable(grammar, memo) {\n return this.obj._isNullable(grammar, memo);\n }\n}\n\nmodule.exports = CaseInsensitiveTerminal;\n","// Based on https://github.com/mathiasbynens/unicode-9.0.0.\n// These are just categories that are used in ES5/ES2015.\n// The full list of Unicode categories is here: http://www.fileformat.info/info/unicode/category/index.htm.\nmodule.exports = {\n // Letters\n Lu: /[A-Z\\xC0-\\xD6\\xD8-\\xDE\\u0100\\u0102\\u0104\\u0106\\u0108\\u010A\\u010C\\u010E\\u0110\\u0112\\u0114\\u0116\\u0118\\u011A\\u011C\\u011E\\u0120\\u0122\\u0124\\u0126\\u0128\\u012A\\u012C\\u012E\\u0130\\u0132\\u0134\\u0136\\u0139\\u013B\\u013D\\u013F\\u0141\\u0143\\u0145\\u0147\\u014A\\u014C\\u014E\\u0150\\u0152\\u0154\\u0156\\u0158\\u015A\\u015C\\u015E\\u0160\\u0162\\u0164\\u0166\\u0168\\u016A\\u016C\\u016E\\u0170\\u0172\\u0174\\u0176\\u0178\\u0179\\u017B\\u017D\\u0181\\u0182\\u0184\\u0186\\u0187\\u0189-\\u018B\\u018E-\\u0191\\u0193\\u0194\\u0196-\\u0198\\u019C\\u019D\\u019F\\u01A0\\u01A2\\u01A4\\u01A6\\u01A7\\u01A9\\u01AC\\u01AE\\u01AF\\u01B1-\\u01B3\\u01B5\\u01B7\\u01B8\\u01BC\\u01C4\\u01C7\\u01CA\\u01CD\\u01CF\\u01D1\\u01D3\\u01D5\\u01D7\\u01D9\\u01DB\\u01DE\\u01E0\\u01E2\\u01E4\\u01E6\\u01E8\\u01EA\\u01EC\\u01EE\\u01F1\\u01F4\\u01F6-\\u01F8\\u01FA\\u01FC\\u01FE\\u0200\\u0202\\u0204\\u0206\\u0208\\u020A\\u020C\\u020E\\u0210\\u0212\\u0214\\u0216\\u0218\\u021A\\u021C\\u021E\\u0220\\u0222\\u0224\\u0226\\u0228\\u022A\\u022C\\u022E\\u0230\\u0232\\u023A\\u023B\\u023D\\u023E\\u0241\\u0243-\\u0246\\u0248\\u024A\\u024C\\u024E\\u0370\\u0372\\u0376\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E\\u038F\\u0391-\\u03A1\\u03A3-\\u03AB\\u03CF\\u03D2-\\u03D4\\u03D8\\u03DA\\u03DC\\u03DE\\u03E0\\u03E2\\u03E4\\u03E6\\u03E8\\u03EA\\u03EC\\u03EE\\u03F4\\u03F7\\u03F9\\u03FA\\u03FD-\\u042F\\u0460\\u0462\\u0464\\u0466\\u0468\\u046A\\u046C\\u046E\\u0470\\u0472\\u0474\\u0476\\u0478\\u047A\\u047C\\u047E\\u0480\\u048A\\u048C\\u048E\\u0490\\u0492\\u0494\\u0496\\u0498\\u049A\\u049C\\u049E\\u04A0\\u04A2\\u04A4\\u04A6\\u04A8\\u04AA\\u04AC\\u04AE\\u04B0\\u04B2\\u04B4\\u04B6\\u04B8\\u04BA\\u04BC\\u04BE\\u04C0\\u04C1\\u04C3\\u04C5\\u04C7\\u04C9\\u04CB\\u04CD\\u04D0\\u04D2\\u04D4\\u04D6\\u04D8\\u04DA\\u04DC\\u04DE\\u04E0\\u04E2\\u04E4\\u04E6\\u04E8\\u04EA\\u04EC\\u04EE\\u04F0\\u04F2\\u04F4\\u04F6\\u04F8\\u04FA\\u04FC\\u04FE\\u0500\\u0502\\u0504\\u0506\\u0508\\u050A\\u050C\\u050E\\u0510\\u0512\\u0514\\u0516\\u0518\\u051A\\u051C\\u051E\\u0520\\u0522\\u0524\\u0526\\u0528\\u052A\\u052C\\u052E\\u0531-\\u0556\\u10A0-\\u10C5\\u10C7\\u10CD\\u13A0-\\u13F5\\u1E00\\u1E02\\u1E04\\u1E06\\u1E08\\u1E0A\\u1E0C\\u1E0E\\u1E10\\u1E12\\u1E14\\u1E16\\u1E18\\u1E1A\\u1E1C\\u1E1E\\u1E20\\u1E22\\u1E24\\u1E26\\u1E28\\u1E2A\\u1E2C\\u1E2E\\u1E30\\u1E32\\u1E34\\u1E36\\u1E38\\u1E3A\\u1E3C\\u1E3E\\u1E40\\u1E42\\u1E44\\u1E46\\u1E48\\u1E4A\\u1E4C\\u1E4E\\u1E50\\u1E52\\u1E54\\u1E56\\u1E58\\u1E5A\\u1E5C\\u1E5E\\u1E60\\u1E62\\u1E64\\u1E66\\u1E68\\u1E6A\\u1E6C\\u1E6E\\u1E70\\u1E72\\u1E74\\u1E76\\u1E78\\u1E7A\\u1E7C\\u1E7E\\u1E80\\u1E82\\u1E84\\u1E86\\u1E88\\u1E8A\\u1E8C\\u1E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\\u2CD4\\u2CD6\\u2CD8\\u2CDA\\u2CDC\\u2CDE\\u2CE0\\u2CE2\\u2CEB\\u2CED\\u2CF2\\uA640\\uA642\\uA644\\uA646\\uA648\\uA64A\\uA64C\\uA64E\\uA650\\uA652\\uA654\\uA656\\uA658\\uA65A\\uA65C\\uA65E\\uA660\\uA662\\uA664\\uA666\\uA668\\uA66A\\uA66C\\uA680\\uA682\\uA684\\uA686\\uA688\\uA68A\\uA68C\\uA68E\\uA690\\uA692\\uA694\\uA696\\uA698\\uA69A\\uA722\\uA724\\uA726\\uA728\\uA72A\\uA72C\\uA72E\\uA732\\uA734\\uA736\\uA738\\uA73A\\uA73C\\uA73E\\uA740\\uA742\\uA744\\uA746\\uA748\\uA74A\\uA74C\\uA74E\\uA750\\uA752\\uA754\\uA756\\uA758\\uA75A\\uA75C\\uA75E\\uA760\\uA762\\uA764\\uA766\\uA768\\uA76A\\uA76C\\uA76E\\uA779\\uA77B\\uA77D\\uA77E\\uA780\\uA782\\uA784\\uA786\\uA78B\\uA78D\\uA790\\uA792\\uA796\\uA798\\uA79A\\uA79C\\uA79E\\uA7A0\\uA7A2\\uA7A4\\uA7A6\\uA7A8\\uA7AA-\\uA7AE\\uA7B0-\\uA7B4\\uA7B6\\uFF21-\\uFF3A]|\\uD801[\\uDC00-\\uDC27\\uDCB0-\\uDCD3]|\\uD803[\\uDC80-\\uDCB2]|\\uD806[\\uDCA0-\\uDCBF]|\\uD835[\\uDC00-\\uDC19\\uDC34-\\uDC4D\\uDC68-\\uDC81\\uDC9C\\uDC9E\\uDC9F\\uDCA2\\uDCA5\\uDCA6\\uDCA9-\\uDCAC\\uDCAE-\\uDCB5\\uDCD0-\\uDCE9\\uDD04\\uDD05\\uDD07-\\uDD0A\\uDD0D-\\uDD14\\uDD16-\\uDD1C\\uDD38\\uDD39\\uDD3B-\\uDD3E\\uDD40-\\uDD44\\uDD46\\uDD4A-\\uDD50\\uDD6C-\\uDD85\\uDDA0-\\uDDB9\\uDDD4-\\uDDED\\uDE08-\\uDE21\\uDE3C-\\uDE55\\uDE70-\\uDE89\\uDEA8-\\uDEC0\\uDEE2-\\uDEFA\\uDF1C-\\uDF34\\uDF56-\\uDF6E\\uDF90-\\uDFA8\\uDFCA]|\\uD83A[\\uDD00-\\uDD21]/,\n Ll: /[a-z\\xB5\\xDF-\\xF6\\xF8-\\xFF\\u0101\\u0103\\u0105\\u0107\\u0109\\u010B\\u010D\\u010F\\u0111\\u0113\\u0115\\u0117\\u0119\\u011B\\u011D\\u011F\\u0121\\u0123\\u0125\\u0127\\u0129\\u012B\\u012D\\u012F\\u0131\\u0133\\u0135\\u0137\\u0138\\u013A\\u013C\\u013E\\u0140\\u0142\\u0144\\u0146\\u0148\\u0149\\u014B\\u014D\\u014F\\u0151\\u0153\\u0155\\u0157\\u0159\\u015B\\u015D\\u015F\\u0161\\u0163\\u0165\\u0167\\u0169\\u016B\\u016D\\u016F\\u0171\\u0173\\u0175\\u0177\\u017A\\u017C\\u017E-\\u0180\\u0183\\u0185\\u0188\\u018C\\u018D\\u0192\\u0195\\u0199-\\u019B\\u019E\\u01A1\\u01A3\\u01A5\\u01A8\\u01AA\\u01AB\\u01AD\\u01B0\\u01B4\\u01B6\\u01B9\\u01BA\\u01BD-\\u01BF\\u01C6\\u01C9\\u01CC\\u01CE\\u01D0\\u01D2\\u01D4\\u01D6\\u01D8\\u01DA\\u01DC\\u01DD\\u01DF\\u01E1\\u01E3\\u01E5\\u01E7\\u01E9\\u01EB\\u01ED\\u01EF\\u01F0\\u01F3\\u01F5\\u01F9\\u01FB\\u01FD\\u01FF\\u0201\\u0203\\u0205\\u0207\\u0209\\u020B\\u020D\\u020F\\u0211\\u0213\\u0215\\u0217\\u0219\\u021B\\u021D\\u021F\\u0221\\u0223\\u0225\\u0227\\u0229\\u022B\\u022D\\u022F\\u0231\\u0233-\\u0239\\u023C\\u023F\\u0240\\u0242\\u0247\\u0249\\u024B\\u024D\\u024F-\\u0293\\u0295-\\u02AF\\u0371\\u0373\\u0377\\u037B-\\u037D\\u0390\\u03AC-\\u03CE\\u03D0\\u03D1\\u03D5-\\u03D7\\u03D9\\u03DB\\u03DD\\u03DF\\u03E1\\u03E3\\u03E5\\u03E7\\u03E9\\u03EB\\u03ED\\u03EF-\\u03F3\\u03F5\\u03F8\\u03FB\\u03FC\\u0430-\\u045F\\u0461\\u0463\\u0465\\u0467\\u0469\\u046B\\u046D\\u046F\\u0471\\u0473\\u0475\\u0477\\u0479\\u047B\\u047D\\u047F\\u0481\\u048B\\u048D\\u048F\\u0491\\u0493\\u0495\\u0497\\u0499\\u049B\\u049D\\u049F\\u04A1\\u04A3\\u04A5\\u04A7\\u04A9\\u04AB\\u04AD\\u04AF\\u04B1\\u04B3\\u04B5\\u04B7\\u04B9\\u04BB\\u04BD\\u04BF\\u04C2\\u04C4\\u04C6\\u04C8\\u04CA\\u04CC\\u04CE\\u04CF\\u04D1\\u04D3\\u04D5\\u04D7\\u04D9\\u04DB\\u04DD\\u04DF\\u04E1\\u04E3\\u04E5\\u04E7\\u04E9\\u04EB\\u04ED\\u04EF\\u04F1\\u04F3\\u04F5\\u04F7\\u04F9\\u04FB\\u04FD\\u04FF\\u0501\\u0503\\u0505\\u0507\\u0509\\u050B\\u050D\\u050F\\u0511\\u0513\\u0515\\u0517\\u0519\\u051B\\u051D\\u051F\\u0521\\u0523\\u0525\\u0527\\u0529\\u052B\\u052D\\u052F\\u0561-\\u0587\\u13F8-\\u13FD\\u1C80-\\u1C88\\u1D00-\\u1D2B\\u1D6B-\\u1D77\\u1D79-\\u1D9A\\u1E01\\u1E03\\u1E05\\u1E07\\u1E09\\u1E0B\\u1E0D\\u1E0F\\u1E11\\u1E13\\u1E15\\u1E17\\u1E19\\u1E1B\\u1E1D\\u1E1F\\u1E21\\u1E23\\u1E25\\u1E27\\u1E29\\u1E2B\\u1E2D\\u1E2F\\u1E31\\u1E33\\u1E35\\u1E37\\u1E39\\u1E3B\\u1E3D\\u1E3F\\u1E41\\u1E43\\u1E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C76-\\u2C7B\\u2C81\\u2C83\\u2C85\\u2C87\\u2C89\\u2C8B\\u2C8D\\u2C8F\\u2C91\\u2C93\\u2C95\\u2C97\\u2C99\\u2C9B\\u2C9D\\u2C9F\\u2CA1\\u2CA3\\u2CA5\\u2CA7\\u2CA9\\u2CAB\\u2CAD\\u2CAF\\u2CB1\\u2CB3\\u2CB5\\u2CB7\\u2CB9\\u2CBB\\u2CBD\\u2CBF\\u2CC1\\u2CC3\\u2CC5\\u2CC7\\u2CC9\\u2CCB\\u2CCD\\u2CCF\\u2CD1\\u2CD3\\u2CD5\\u2CD7\\u2CD9\\u2CDB\\u2CDD\\u2CDF\\u2CE1\\u2CE3\\u2CE4\\u2CEC\\u2CEE\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\uA641\\uA643\\uA645\\uA647\\uA649\\uA64B\\uA64D\\uA64F\\uA651\\uA653\\uA655\\uA657\\uA659\\uA65B\\uA65D\\uA65F\\uA661\\uA663\\uA665\\uA667\\uA669\\uA66B\\uA66D\\uA681\\uA683\\uA685\\uA687\\uA689\\uA68B\\uA68D\\uA68F\\uA691\\uA693\\uA695\\uA697\\uA699\\uA69B\\uA723\\uA725\\uA727\\uA729\\uA72B\\uA72D\\uA72F-\\uA731\\uA733\\uA735\\uA737\\uA739\\uA73B\\uA73D\\uA73F\\uA741\\uA743\\uA745\\uA747\\uA749\\uA74B\\uA74D\\uA74F\\uA751\\uA753\\uA755\\uA757\\uA759\\uA75B\\uA75D\\uA75F\\uA761\\uA763\\uA765\\uA767\\uA769\\uA76B\\uA76D\\uA76F\\uA771-\\uA778\\uA77A\\uA77C\\uA77F\\uA781\\uA783\\uA785\\uA787\\uA78C\\uA78E\\uA791\\uA793-\\uA795\\uA797\\uA799\\uA79B\\uA79D\\uA79F\\uA7A1\\uA7A3\\uA7A5\\uA7A7\\uA7A9\\uA7B5\\uA7B7\\uA7FA\\uAB30-\\uAB5A\\uAB60-\\uAB65\\uAB70-\\uABBF\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFF41-\\uFF5A]|\\uD801[\\uDC28-\\uDC4F\\uDCD8-\\uDCFB]|\\uD803[\\uDCC0-\\uDCF2]|\\uD806[\\uDCC0-\\uDCDF]|\\uD835[\\uDC1A-\\uDC33\\uDC4E-\\uDC54\\uDC56-\\uDC67\\uDC82-\\uDC9B\\uDCB6-\\uDCB9\\uDCBB\\uDCBD-\\uDCC3\\uDCC5-\\uDCCF\\uDCEA-\\uDD03\\uDD1E-\\uDD37\\uDD52-\\uDD6B\\uDD86-\\uDD9F\\uDDBA-\\uDDD3\\uDDEE-\\uDE07\\uDE22-\\uDE3B\\uDE56-\\uDE6F\\uDE8A-\\uDEA5\\uDEC2-\\uDEDA\\uDEDC-\\uDEE1\\uDEFC-\\uDF14\\uDF16-\\uDF1B\\uDF36-\\uDF4E\\uDF50-\\uDF55\\uDF70-\\uDF88\\uDF8A-\\uDF8F\\uDFAA-\\uDFC2\\uDFC4-\\uDFC9\\uDFCB]|\\uD83A[\\uDD22-\\uDD43]/,\n Lt: /[\\u01C5\\u01C8\\u01CB\\u01F2\\u1F88-\\u1F8F\\u1F98-\\u1F9F\\u1FA8-\\u1FAF\\u1FBC\\u1FCC\\u1FFC]/,\n Lm: /[\\u02B0-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0374\\u037A\\u0559\\u0640\\u06E5\\u06E6\\u07F4\\u07F5\\u07FA\\u081A\\u0824\\u0828\\u0971\\u0E46\\u0EC6\\u10FC\\u17D7\\u1843\\u1AA7\\u1C78-\\u1C7D\\u1D2C-\\u1D6A\\u1D78\\u1D9B-\\u1DBF\\u2071\\u207F\\u2090-\\u209C\\u2C7C\\u2C7D\\u2D6F\\u2E2F\\u3005\\u3031-\\u3035\\u303B\\u309D\\u309E\\u30FC-\\u30FE\\uA015\\uA4F8-\\uA4FD\\uA60C\\uA67F\\uA69C\\uA69D\\uA717-\\uA71F\\uA770\\uA788\\uA7F8\\uA7F9\\uA9CF\\uA9E6\\uAA70\\uAADD\\uAAF3\\uAAF4\\uAB5C-\\uAB5F\\uFF70\\uFF9E\\uFF9F]|\\uD81A[\\uDF40-\\uDF43]|\\uD81B[\\uDF93-\\uDF9F\\uDFE0]/,\n Lo: /[\\xAA\\xBA\\u01BB\\u01C0-\\u01C3\\u0294\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0620-\\u063F\\u0641-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u0800-\\u0815\\u0840-\\u0858\\u08A0-\\u08B4\\u08B6-\\u08BD\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0972-\\u0980\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AD0\\u0AE0\\u0AE1\\u0AF9\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B5C\\u0B5D\\u0B5F-\\u0B61\\u0B71\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BD0\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D\\u0C58-\\u0C5A\\u0C60\\u0C61\\u0C80\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBD\\u0CDE\\u0CE0\\u0CE1\\u0CF1\\u0CF2\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D\\u0D4E\\u0D54-\\u0D56\\u0D5F-\\u0D61\\u0D7A-\\u0D7F\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0E01-\\u0E30\\u0E32\\u0E33\\u0E40-\\u0E45\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EDC-\\u0EDF\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081\\u108E\\u10D0-\\u10FA\\u10FD-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16F1-\\u16F8\\u1700-\\u170C\\u170E-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17DC\\u1820-\\u1842\\u1844-\\u1877\\u1880-\\u1884\\u1887-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u1A00-\\u1A16\\u1A20-\\u1A54\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C77\\u1CE9-\\u1CEC\\u1CEE-\\u1CF1\\u1CF5\\u1CF6\\u2135-\\u2138\\u2D30-\\u2D67\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u3006\\u303C\\u3041-\\u3096\\u309F\\u30A1-\\u30FA\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FD5\\uA000-\\uA014\\uA016-\\uA48C\\uA4D0-\\uA4F7\\uA500-\\uA60B\\uA610-\\uA61F\\uA62A\\uA62B\\uA66E\\uA6A0-\\uA6E5\\uA78F\\uA7F7\\uA7FB-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB\\uA8FD\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9E0-\\uA9E4\\uA9E7-\\uA9EF\\uA9FA-\\uA9FE\\uAA00-\\uAA28\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA6F\\uAA71-\\uAA76\\uAA7A\\uAA7E-\\uAAAF\\uAAB1\\uAAB5\\uAA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15-\\uDE17\\uDE19-\\uDE33\\uDE60-\\uDE7C\\uDE80-\\uDE9C\\uDEC0-\\uDEC7\\uDEC9-\\uDEE4\\uDF00-\\uDF35\\uDF40-\\uDF55\\uDF60-\\uDF72\\uDF80-\\uDF91]|\\uD803[\\uDC00-\\uDC48]|\\uD804[\\uDC03-\\uDC37\\uDC83-\\uDCAF\\uDCD0-\\uDCE8\\uDD03-\\uDD26\\uDD50-\\uDD72\\uDD76\\uDD83-\\uDDB2\\uDDC1-\\uDDC4\\uDDDA\\uDDDC\\uDE00-\\uDE11\\uDE13-\\uDE2B\\uDE80-\\uDE86\\uDE88\\uDE8A-\\uDE8D\\uDE8F-\\uDE9D\\uDE9F-\\uDEA8\\uDEB0-\\uDEDE\\uDF05-\\uDF0C\\uDF0F\\uDF10\\uDF13-\\uDF28\\uDF2A-\\uDF30\\uDF32\\uDF33\\uDF35-\\uDF39\\uDF3D\\uDF50\\uDF5D-\\uDF61]|\\uD805[\\uDC00-\\uDC34\\uDC47-\\uDC4A\\uDC80-\\uDCAF\\uDCC4\\uDCC5\\uDCC7\\uDD80-\\uDDAE\\uDDD8-\\uDDDB\\uDE00-\\uDE2F\\uDE44\\uDE80-\\uDEAA\\uDF00-\\uDF19]|\\uD806[\\uDCFF\\uDEC0-\\uDEF8]|\\uD807[\\uDC00-\\uDC08\\uDC0A-\\uDC2E\\uDC40\\uDC72-\\uDC8F]|\\uD808[\\uDC00-\\uDF99]|\\uD809[\\uDC80-\\uDD43]|[\\uD80C\\uD81C-\\uD820\\uD840-\\uD868\\uD86A-\\uD86C\\uD86F-\\uD872][\\uDC00-\\uDFFF]|\\uD80D[\\uDC00-\\uDC2E]|\\uD811[\\uDC00-\\uDE46]|\\uD81A[\\uDC00-\\uDE38\\uDE40-\\uDE5E\\uDED0-\\uDEED\\uDF00-\\uDF2F\\uDF63-\\uDF77\\uDF7D-\\uDF8F]|\\uD81B[\\uDF00-\\uDF44\\uDF50]|\\uD821[\\uDC00-\\uDFEC]|\\uD822[\\uDC00-\\uDEF2]|\\uD82C[\\uDC00\\uDC01]|\\uD82F[\\uDC00-\\uDC6A\\uDC70-\\uDC7C\\uDC80-\\uDC88\\uDC90-\\uDC99]|\\uD83A[\\uDC00-\\uDCC4]|\\uD83B[\\uDE00-\\uDE03\\uDE05-\\uDE1F\\uDE21\\uDE22\\uDE24\\uDE27\\uDE29-\\uDE32\\uDE34-\\uDE37\\uDE39\\uDE3B\\uDE42\\uDE47\\uDE49\\uDE4B\\uDE4D-\\uDE4F\\uDE51\\uDE52\\uDE54\\uDE57\\uDE59\\uDE5B\\uDE5D\\uDE5F\\uDE61\\uDE62\\uDE64\\uDE67-\\uDE6A\\uDE6C-\\uDE72\\uDE74-\\uDE77\\uDE79-\\uDE7C\\uDE7E\\uDE80-\\uDE89\\uDE8B-\\uDE9B\\uDEA1-\\uDEA3\\uDEA5-\\uDEA9\\uDEAB-\\uDEBB]|\\uD869[\\uDC00-\\uDED6\\uDF00-\\uDFFF]|\\uD86D[\\uDC00-\\uDF34\\uDF40-\\uDFFF]|\\uD86E[\\uDC00-\\uDC1D\\uDC20-\\uDFFF]|\\uD873[\\uDC00-\\uDEA1]|\\uD87E[\\uDC00-\\uDE1D]/,\n\n // Numbers\n Nl: /[\\u16EE-\\u16F0\\u2160-\\u2182\\u2185-\\u2188\\u3007\\u3021-\\u3029\\u3038-\\u303A\\uA6E6-\\uA6EF]|\\uD800[\\uDD40-\\uDD74\\uDF41\\uDF4A\\uDFD1-\\uDFD5]|\\uD809[\\uDC00-\\uDC6E]/,\n Nd: /[0-9\\u0660-\\u0669\\u06F0-\\u06F9\\u07C0-\\u07C9\\u0966-\\u096F\\u09E6-\\u09EF\\u0A66-\\u0A6F\\u0AE6-\\u0AEF\\u0B66-\\u0B6F\\u0BE6-\\u0BEF\\u0C66-\\u0C6F\\u0CE6-\\u0CEF\\u0D66-\\u0D6F\\u0DE6-\\u0DEF\\u0E50-\\u0E59\\u0ED0-\\u0ED9\\u0F20-\\u0F29\\u1040-\\u1049\\u1090-\\u1099\\u17E0-\\u17E9\\u1810-\\u1819\\u1946-\\u194F\\u19D0-\\u19D9\\u1A80-\\u1A89\\u1A90-\\u1A99\\u1B50-\\u1B59\\u1BB0-\\u1BB9\\u1C40-\\u1C49\\u1C50-\\u1C59\\uA620-\\uA629\\uA8D0-\\uA8D9\\uA900-\\uA909\\uA9D0-\\uA9D9\\uA9F0-\\uA9F9\\uAA50-\\uAA59\\uABF0-\\uABF9\\uFF10-\\uFF19]|\\uD801[\\uDCA0-\\uDCA9]|\\uD804[\\uDC66-\\uDC6F\\uDCF0-\\uDCF9\\uDD36-\\uDD3F\\uDDD0-\\uDDD9\\uDEF0-\\uDEF9]|[\\uD805\\uD807][\\uDC50-\\uDC59\\uDCD0-\\uDCD9\\uDE50-\\uDE59\\uDEC0-\\uDEC9\\uDF30-\\uDF39]|\\uD806[\\uDCE0-\\uDCE9]|\\uD81A[\\uDE60-\\uDE69\\uDF50-\\uDF59]|\\uD835[\\uDFCE-\\uDFFF]|\\uD83A[\\uDD50-\\uDD59]/,\n\n // Marks\n Mn: /[\\u0300-\\u036F\\u0483-\\u0487\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u0610-\\u061A\\u064B-\\u065F\\u0670\\u06D6-\\u06DC\\u06DF-\\u06E4\\u06E7\\u06E8\\u06EA-\\u06ED\\u0711\\u0730-\\u074A\\u07A6-\\u07B0\\u07EB-\\u07F3\\u0816-\\u0819\\u081B-\\u0823\\u0825-\\u0827\\u0829-\\u082D\\u0859-\\u085B\\u08D4-\\u08E1\\u08E3-\\u0902\\u093A\\u093C\\u0941-\\u0948\\u094D\\u0951-\\u0957\\u0962\\u0963\\u0981\\u09BC\\u09C1-\\u09C4\\u09CD\\u09E2\\u09E3\\u0A01\\u0A02\\u0A3C\\u0A41\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A70\\u0A71\\u0A75\\u0A81\\u0A82\\u0ABC\\u0AC1-\\u0AC5\\u0AC7\\u0AC8\\u0ACD\\u0AE2\\u0AE3\\u0B01\\u0B3C\\u0B3F\\u0B41-\\u0B44\\u0B4D\\u0B56\\u0B62\\u0B63\\u0B82\\u0BC0\\u0BCD\\u0C00\\u0C3E-\\u0C40\\u0C46-\\u0C48\\u0C4A-\\u0C4D\\u0C55\\u0C56\\u0C62\\u0C63\\u0C81\\u0CBC\\u0CBF\\u0CC6\\u0CCC\\u0CCD\\u0CE2\\u0CE3\\u0D01\\u0D41-\\u0D44\\u0D4D\\u0D62\\u0D63\\u0DCA\\u0DD2-\\u0DD4\\u0DD6\\u0E31\\u0E34-\\u0E3A\\u0E47-\\u0E4E\\u0EB1\\u0EB4-\\u0EB9\\u0EBB\\u0EBC\\u0EC8-\\u0ECD\\u0F18\\u0F19\\u0F35\\u0F37\\u0F39\\u0F71-\\u0F7E\\u0F80-\\u0F84\\u0F86\\u0F87\\u0F8D-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u102D-\\u1030\\u1032-\\u1037\\u1039\\u103A\\u103D\\u103E\\u1058\\u1059\\u105E-\\u1060\\u1071-\\u1074\\u1082\\u1085\\u1086\\u108D\\u109D\\u135D-\\u135F\\u1712-\\u1714\\u1732-\\u1734\\u1752\\u1753\\u1772\\u1773\\u17B4\\u17B5\\u17B7-\\u17BD\\u17C6\\u17C9-\\u17D3\\u17DD\\u180B-\\u180D\\u1885\\u1886\\u18A9\\u1920-\\u1922\\u1927\\u1928\\u1932\\u1939-\\u193B\\u1A17\\u1A18\\u1A1B\\u1A56\\u1A58-\\u1A5E\\u1A60\\u1A62\\u1A65-\\u1A6C\\u1A73-\\u1A7C\\u1A7F\\u1AB0-\\u1ABD\\u1B00-\\u1B03\\u1B34\\u1B36-\\u1B3A\\u1B3C\\u1B42\\u1B6B-\\u1B73\\u1B80\\u1B81\\u1BA2-\\u1BA5\\u1BA8\\u1BA9\\u1BAB-\\u1BAD\\u1BE6\\u1BE8\\u1BE9\\u1BED\\u1B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\u0BBF]|[\\u0BC1-\\u0BC2]|[\\u0BC6-\\u0BC8]|[\\u0BCA-\\u0BCC]|[\\u0BD7-\\u0BD7]|[\\u0C01-\\u0C03]|[\\u0C41-\\u0C44]|[\\u0C82-\\u0C83]|[\\u0CBE-\\u0CBE]|[\\u0CC0-\\u0CC4]|[\\u0CC7-\\u0CC8]|[\\u0CCA-\\u0CCB]|[\\u0CD5-\\u0CD6]|[\\u0D02-\\u0D03]|[\\u0D3E-\\u0D40]|[\\u0D46-\\u0D48]|[\\u0D4A-\\u0D4C]|[\\u0D57-\\u0D57]|[\\u0F3E-\\u0F3F]|[\\u0F7F-\\u0F7F]/,\n\n // Punctuation, Connector\n Pc: /[_\\u203F\\u2040\\u2054\\uFE33\\uFE34\\uFE4D-\\uFE4F\\uFF3F]/,\n\n // Separator, Space\n Zs: /[ \\xA0\\u1680\\u2000-\\u200A\\u202F\\u205F\\u3000]/,\n\n // These two are not real Unicode categories, but our useful for Ohm.\n // L is a combination of all the letter categories.\n // Ltmo is a combination of Lt, Lm, and Lo.\n L: /[A-Za-z\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0620-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u08A0-\\u08B4\\u08B6-\\u08BD\\u0904-\\u0939\\u093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\u0E32\\u0E33\\u0E40-\\u0E46\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EDC-\\u0EDF\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081\\u108E\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F5\\u13F8-\\u13FD\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16F1-\\u16F8\\u1700-\\u170C\\u170E-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7\\u17DC\\u1820-\\u1877\\u1880-\\u1884\\u1887-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u1A00-\\u1A16\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1C80-\\u1C88\\u1CE9-\\u1CEC\\u1CEE-\\u1CF1\\u1CF5\\u1CF6\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2183\\u2184\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2E2F\\u3005\\u3006\\u3031-\\u3035\\u303B\\u303C\\u3041-\\u3096\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FD5\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B\\uA640-\\uA66E\\uA67F-\\uA69D\\uA6A0-\\uA6E5\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA7AE\\uA7B0-\\uA7B7\\uA7F7-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80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uDE24\\uDE27\\uDE29-\\uDE32\\uDE34-\\uDE37\\uDE39\\uDE3B\\uDE42\\uDE47\\uDE49\\uDE4B\\uDE4D-\\uDE4F\\uDE51\\uDE52\\uDE54\\uDE57\\uDE59\\uDE5B\\uDE5D\\uDE5F\\uDE61\\uDE62\\uDE64\\uDE67-\\uDE6A\\uDE6C-\\uDE72\\uDE74-\\uDE77\\uDE79-\\uDE7C\\uDE7E\\uDE80-\\uDE89\\uDE8B-\\uDE9B\\uDEA1-\\uDEA3\\uDEA5-\\uDEA9\\uDEAB-\\uDEBB]|\\uD869[\\uDC00-\\uDED6\\uDF00-\\uDFFF]|\\uD86D[\\uDC00-\\uDF34\\uDF40-\\uDFFF]|\\uD86E[\\uDC00-\\uDC1D\\uDC20-\\uDFFF]|\\uD873[\\uDC00-\\uDEA1]|\\uD87E[\\uDC00-\\uDE1D]/,\n Ltmo: /[\\u01C5\\u01C8\\u01CB\\u01F2\\u1F88-\\u1F8F\\u1F98-\\u1F9F\\u1FA8-\\u1FAF\\u1FBC\\u1FCC\\u1FFC]|[\\u02B0-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0374\\u037A\\u0559\\u0640\\u06E5\\u06E6\\u07F4\\u07F5\\u07FA\\u081A\\u0824\\u0828\\u0971\\u0E46\\u0EC6\\u10FC\\u17D7\\u1843\\u1AA7\\u1C78-\\u1C7D\\u1D2C-\\u1D6A\\u1D78\\u1D9B-\\u1DBF\\u2071\\u207F\\u2090-\\u209C\\u2C7C\\u2C7D\\u2D6F\\u2E2F\\u3005\\u3031-\\u3035\\u303B\\u309D\\u309E\\u30FC-\\u30FE\\uA015\\uA4F8-\\uA4FD\\uA60C\\uA67F\\uA69C\\uA69D\\uA717-\\uA71F\\uA770\\uA788\\uA7F8\\uA7F9\\uA9CF\\uA9E6\\uAA70\\uAADD\\uAAF3\\uAAF4\\uAB5C-\\uAB5F\\uFF70\\uFF9E\\uFF9F]|\\uD81A[\\uDF40-\\uDF43]|\\uD81B[\\uDF93-\\uDF9F\\uDFE0]|[\\xAA\\xBA\\u01BB\\u01C0-\\u01C3\\u0294\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0620-\\u063F\\u0641-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u0800-\\u0815\\u0840-\\u0858\\u08A0-\\u08B4\\u08B6-\\u08BD\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0972-\\u0980\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AD0\\u0AE0\\u0AE1\\u0AF9\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B5C\\u0B5D\\u0B5F-\\u0B61\\u0B71\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BD0\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D\\u0C58-\\u0C5A\\u0C60\\u0C61\\u0C80\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBD\\u0CDE\\u0CE0\\u0CE1\\u0CF1\\u0CF2\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D\\u0D4E\\u0D54-\\u0D56\\u0D5F-\\u0D61\\u0D7A-\\u0D7F\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0E01-\\u0E30\\u0E32\\u0E33\\u0E40-\\u0E45\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EDC-\\u0EDF\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081\\u108E\\u10D0-\\u10FA\\u10FD-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16F1-\\u16F8\\u1700-\\u170C\\u170E-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17DC\\u1820-\\u1842\\u1844-\\u1877\\u1880-\\u1884\\u1887-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u1A00-\\u1A16\\u1A20-\\u1A54\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C77\\u1CE9-\\u1CEC\\u1CEE-\\u1CF1\\u1CF5\\u1CF6\\u2135-\\u2138\\u2D30-\\u2D67\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u3006\\u303C\\u3041-\\u3096\\u309F\\u30A1-\\u30FA\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FD5\\uA000-\\uA014\\uA016-\\uA48C\\uA4D0-\\uA4F7\\uA500-\\uA60B\\uA610-\\uA61F\\uA62A\\uA62B\\uA66E\\uA6A0-\\uA6E5\\uA78F\\uA7F7\\uA7FB-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB\\uA8FD\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9E0-\\uA9E4\\uA9E7-\\uA9EF\\uA9FA-\\uA9FE\\uAA00-\\uAA28\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA6F\\uAA71-\\uAA76\\uAA7A\\uAA7E-\\uAAAF\\uAAB1\\uAAB5\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB\\uAADC\\uAAE0-\\uAAEA\\uAAF2\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uA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DF40-\\uDF55\\uDF60-\\uDF72\\uDF80-\\uDF91]|\\uD803[\\uDC00-\\uDC48]|\\uD804[\\uDC03-\\uDC37\\uDC83-\\uDCAF\\uDCD0-\\uDCE8\\uDD03-\\uDD26\\uDD50-\\uDD72\\uDD76\\uDD83-\\uDDB2\\uDDC1-\\uDDC4\\uDDDA\\uDDDC\\uDE00-\\uDE11\\uDE13-\\uDE2B\\uDE80-\\uDE86\\uDE88\\uDE8A-\\uDE8D\\uDE8F-\\uDE9D\\uDE9F-\\uDEA8\\uDEB0-\\uDEDE\\uDF05-\\uDF0C\\uDF0F\\uDF10\\uDF13-\\uDF28\\uDF2A-\\uDF30\\uDF32\\uDF33\\uDF35-\\uDF39\\uDF3D\\uDF50\\uDF5D-\\uDF61]|\\uD805[\\uDC00-\\uDC34\\uDC47-\\uDC4A\\uDC80-\\uDCAF\\uDCC4\\uDCC5\\uDCC7\\uDD80-\\uDDAE\\uDDD8-\\uDDDB\\uDE00-\\uDE2F\\uDE44\\uDE80-\\uDEAA\\uDF00-\\uDF19]|\\uD806[\\uDCFF\\uDEC0-\\uDEF8]|\\uD807[\\uDC00-\\uDC08\\uDC0A-\\uDC2E\\uDC40\\uDC72-\\uDC8F]|\\uD808[\\uDC00-\\uDF99]|\\uD809[\\uDC80-\\uDD43]|[\\uD80C\\uD81C-\\uD820\\uD840-\\uD868\\uD86A-\\uD86C\\uD86F-\\uD872][\\uDC00-\\uDFFF]|\\uD80D[\\uDC00-\\uDC2E]|\\uD811[\\uDC00-\\uDE46]|\\uD81A[\\uDC00-\\uDE38\\uDE40-\\uDE5E\\uDED0-\\uDEED\\uDF00-\\uDF2F\\uDF63-\\uDF77\\uDF7D-\\uDF8F]|\\uD81B[\\uDF00-\\uDF44\\uDF50]|\\uD821[\\uDC00-\\uDFEC]|\\uD822[\\uDC00-\\uDEF2]|\\uD82C[\\uDC00\\uDC01]|\\uD82F[\\uDC00-\\uDC6A\\uDC70-\\uDC7C\\uDC80-\\uDC88\\uDC90-\\uDC99]|\\uD83A[\\uDC00-\\uDCC4]|\\uD83B[\\uDE00-\\uDE03\\uDE05-\\uDE1F\\uDE21\\uDE22\\uDE24\\uDE27\\uDE29-\\uDE32\\uDE34-\\uDE37\\uDE39\\uDE3B\\uDE42\\uDE47\\uDE49\\uDE4B\\uDE4D-\\uDE4F\\uDE51\\uDE52\\uDE54\\uDE57\\uDE59\\uDE5B\\uDE5D\\uDE5F\\uDE61\\uDE62\\uDE64\\uDE67-\\uDE6A\\uDE6C-\\uDE72\\uDE74-\\uDE77\\uDE79-\\uDE7C\\uDE7E\\uDE80-\\uDE89\\uDE8B-\\uDE9B\\uDEA1-\\uDEA3\\uDEA5-\\uDEA9\\uDEAB-\\uDEBB]|\\uD869[\\uDC00-\\uDED6\\uDF00-\\uDFFF]|\\uD86D[\\uDC00-\\uDF34\\uDF40-\\uDFFF]|\\uD86E[\\uDC00-\\uDC1D\\uDC20-\\uDFFF]|\\uD873[\\uDC00-\\uDEA1]|\\uD87E[\\uDC00-\\uDE1D]/\n};\n","'use strict';\n\n// --------------------------------------------------------------------\n// Imports\n// --------------------------------------------------------------------\n\nconst common = require('./common');\nconst pexprs = require('./pexprs');\n\n// --------------------------------------------------------------------\n// Operations\n// --------------------------------------------------------------------\n\n/*\n Return true if we should skip spaces preceding this expression in a syntactic context.\n*/\npexprs.PExpr.prototype.allowsSkippingPrecedingSpace = common.abstract(\n 'allowsSkippingPrecedingSpace'\n);\n\n/*\n Generally, these are all first-order expressions and (with the exception of Apply)\n directly read from the input stream.\n*/\npexprs.any.allowsSkippingPrecedingSpace =\n pexprs.end.allowsSkippingPrecedingSpace =\n pexprs.Apply.prototype.allowsSkippingPrecedingSpace =\n pexprs.Terminal.prototype.allowsSkippingPrecedingSpace =\n pexprs.Range.prototype.allowsSkippingPrecedingSpace =\n pexprs.UnicodeChar.prototype.allowsSkippingPrecedingSpace =\n function() {\n return true;\n };\n\n/*\n Higher-order expressions that don't directly consume input.\n*/\npexprs.Alt.prototype.allowsSkippingPrecedingSpace =\n pexprs.Iter.prototype.allowsSkippingPrecedingSpace =\n pexprs.Lex.prototype.allowsSkippingPrecedingSpace =\n pexprs.Lookahead.prototype.allowsSkippingPrecedingSpace =\n pexprs.Not.prototype.allowsSkippingPrecedingSpace =\n pexprs.Param.prototype.allowsSkippingPrecedingSpace =\n pexprs.Seq.prototype.allowsSkippingPrecedingSpace =\n function() {\n return false;\n };\n","'use strict';\n\n// --------------------------------------------------------------------\n// Imports\n// --------------------------------------------------------------------\n\nconst {abstract, isSyntactic} = require('./common');\nconst errors = require('./errors');\nconst pexprs = require('./pexprs');\nconst util = require('./util');\n\nlet BuiltInRules;\n\nutil.awaitBuiltInRules(g => {\n BuiltInRules = g;\n});\n\n// --------------------------------------------------------------------\n// Operations\n// --------------------------------------------------------------------\n\nlet lexifyCount;\n\npexprs.PExpr.prototype.assertAllApplicationsAreValid = function(ruleName, grammar) {\n lexifyCount = 0;\n this._assertAllApplicationsAreValid(ruleName, grammar);\n};\n\npexprs.PExpr.prototype._assertAllApplicationsAreValid = abstract(\n '_assertAllApplicationsAreValid'\n);\n\npexprs.any._assertAllApplicationsAreValid =\n pexprs.end._assertAllApplicationsAreValid =\n pexprs.Terminal.prototype._assertAllApplicationsAreValid =\n pexprs.Range.prototype._assertAllApplicationsAreValid =\n pexprs.Param.prototype._assertAllApplicationsAreValid =\n pexprs.UnicodeChar.prototype._assertAllApplicationsAreValid =\n function(ruleName, grammar) {\n // no-op\n };\n\npexprs.Lex.prototype._assertAllApplicationsAreValid = function(ruleName, grammar) {\n lexifyCount++;\n this.expr._assertAllApplicationsAreValid(ruleName, grammar);\n lexifyCount--;\n};\n\npexprs.Alt.prototype._assertAllApplicationsAreValid = function(ruleName, grammar) {\n for (let idx = 0; idx < this.terms.length; idx++) {\n this.terms[idx]._assertAllApplicationsAreValid(ruleName, grammar);\n }\n};\n\npexprs.Seq.prototype._assertAllApplicationsAreValid = function(ruleName, grammar) {\n for (let idx = 0; idx < this.factors.length; idx++) {\n this.factors[idx]._assertAllApplicationsAreValid(ruleName, grammar);\n }\n};\n\npexprs.Iter.prototype._assertAllApplicationsAreValid =\n pexprs.Not.prototype._assertAllApplicationsAreValid =\n pexprs.Lookahead.prototype._assertAllApplicationsAreValid =\n function(ruleName, grammar) {\n this.expr._assertAllApplicationsAreValid(ruleName, grammar);\n };\n\npexprs.Apply.prototype._assertAllApplicationsAreValid = function(\n ruleName,\n grammar,\n skipSyntacticCheck = false\n) {\n const ruleInfo = grammar.rules[this.ruleName];\n\n // Make sure that the rule exists...\n if (!ruleInfo) {\n throw errors.undeclaredRule(this.ruleName, grammar.name, this.source);\n }\n\n // ...and that this application is allowed\n if (\n !skipSyntacticCheck &&\n isSyntactic(this.ruleName) &&\n (!isSyntactic(ruleName) || lexifyCount > 0)\n ) {\n throw errors.applicationOfSyntacticRuleFromLexicalContext(this.ruleName, this);\n }\n\n // ...and that this application has the correct number of arguments\n const actual = this.args.length;\n const expected = ruleInfo.formals.length;\n if (actual !== expected) {\n throw errors.wrongNumberOfArguments(this.ruleName, expected, actual, this.source);\n }\n\n const isBuiltInApplySyntactic =\n BuiltInRules && ruleInfo === BuiltInRules.rules.experimentalApplySyntactic;\n const isBuiltInCaseInsensitive =\n BuiltInRules && ruleInfo === BuiltInRules.rules.caseInsensitive;\n\n // ...and that all of the argument expressions only have valid applications and have arity 1.\n // If `this` is an application of the built-in experimentalApplySyntactic rule, then its arg is\n // allowed (and expected) to be a syntactic rule, even if we're in a lexical context.\n this.args.forEach(arg => {\n arg._assertAllApplicationsAreValid(ruleName, grammar, isBuiltInApplySyntactic);\n if (arg.getArity() !== 1) {\n throw errors.invalidParameter(this.ruleName, arg);\n }\n });\n\n // Extra checks for \"special\" applications\n\n // If it's an application of 'caseInsensitive', ensure that the argument is a Terminal.\n if (isBuiltInCaseInsensitive) {\n if (!(this.args[0] instanceof pexprs.Terminal)) {\n throw errors.incorrectArgumentType('a Terminal (e.g. \"abc\")', this.args[0]);\n }\n }\n\n if (isBuiltInApplySyntactic) {\n const arg = this.args[0];\n if (!(arg instanceof pexprs.Apply)) {\n throw errors.incorrectArgumentType('a syntactic rule application', arg);\n }\n if (!isSyntactic(arg.ruleName)) {\n throw errors.experimentalApplySyntacticWithLexicalRuleApplication(arg);\n }\n }\n};\n","'use strict';\n\n// --------------------------------------------------------------------\n// Private stuff\n// --------------------------------------------------------------------\n\nfunction Namespace() {}\nNamespace.prototype = Object.create(null);\n\nNamespace.asNamespace = function(objOrNamespace) {\n if (objOrNamespace instanceof Namespace) {\n return objOrNamespace;\n }\n return Namespace.createNamespace(objOrNamespace);\n};\n\n// Create a new namespace. If `optProps` is specified, all of its properties\n// will be copied to the new namespace.\nNamespace.createNamespace = function(optProps) {\n return Namespace.extend(Namespace.prototype, optProps);\n};\n\n// Create a new namespace which extends another namespace. If `optProps` is\n// specified, all of its properties will be copied to the new namespace.\nNamespace.extend = function(namespace, optProps) {\n if (namespace !== Namespace.prototype && !(namespace instanceof Namespace)) {\n throw new TypeError('not a Namespace object: ' + namespace);\n }\n const ns = Object.create(namespace, {\n constructor: {\n value: Namespace,\n enumerable: false,\n writable: true,\n configurable: true,\n },\n });\n return Object.assign(ns, optProps);\n};\n\n// TODO: Should this be a regular method?\nNamespace.toString = function(ns) {\n return Object.prototype.toString.call(ns);\n};\n\n// --------------------------------------------------------------------\n// Exports\n// --------------------------------------------------------------------\n\nmodule.exports = Namespace;\n","'use strict';\n\n// --------------------------------------------------------------------\n// Imports\n// --------------------------------------------------------------------\n\nconst pexprs = require('./pexprs');\n\nconst Namespace = require('./Namespace');\n\n// --------------------------------------------------------------------\n// Private stuff\n// --------------------------------------------------------------------\n\nfunction createError(message, optInterval) {\n let e;\n if (optInterval) {\n e = new Error(optInterval.getLineAndColumnMessage() + message);\n e.shortMessage = message;\n e.interval = optInterval;\n } else {\n e = new Error(message);\n }\n return e;\n}\n\n// ----------------- errors about intervals -----------------\n\nfunction intervalSourcesDontMatch() {\n return createError(\"Interval sources don't match\");\n}\n\n// ----------------- errors about grammars -----------------\n\n// Grammar syntax error\n\nfunction grammarSyntaxError(matchFailure) {\n const e = new Error();\n Object.defineProperty(e, 'message', {\n enumerable: true,\n get() {\n return matchFailure.message;\n },\n });\n Object.defineProperty(e, 'shortMessage', {\n enumerable: true,\n get() {\n return 'Expected ' + matchFailure.getExpectedText();\n },\n });\n e.interval = matchFailure.getInterval();\n return e;\n}\n\n// Undeclared grammar\n\nfunction undeclaredGrammar(grammarName, namespace, interval) {\n const message = namespace ?\n 'Grammar ' +\n grammarName +\n ' is not declared in namespace ' +\n Namespace.toString(namespace) :\n 'Undeclared grammar ' + grammarName;\n return createError(message, interval);\n}\n\n// Duplicate grammar declaration\n\nfunction duplicateGrammarDeclaration(grammar, namespace) {\n return createError('Grammar ' + grammar.name + ' is already declared in this namespace');\n}\n\n// ----------------- rules -----------------\n\n// Undeclared rule\n\nfunction undeclaredRule(ruleName, grammarName, optInterval) {\n return createError(\n 'Rule ' + ruleName + ' is not declared in grammar ' + grammarName,\n optInterval\n );\n}\n\n// Cannot override undeclared rule\n\nfunction cannotOverrideUndeclaredRule(ruleName, grammarName, optSource) {\n return createError(\n 'Cannot override rule ' + ruleName + ' because it is not declared in ' + grammarName,\n optSource\n );\n}\n\n// Cannot extend undeclared rule\n\nfunction cannotExtendUndeclaredRule(ruleName, grammarName, optSource) {\n return createError(\n 'Cannot extend rule ' + ruleName + ' because it is not declared in ' + grammarName,\n optSource\n );\n}\n\n// Duplicate rule declaration\n\nfunction duplicateRuleDeclaration(ruleName, grammarName, declGrammarName, optSource) {\n let message =\n \"Duplicate declaration for rule '\" + ruleName + \"' in grammar '\" + grammarName + \"'\";\n if (grammarName !== declGrammarName) {\n message += \" (originally declared in '\" + declGrammarName + \"')\";\n }\n return createError(message, optSource);\n}\n\n// Wrong number of parameters\n\nfunction wrongNumberOfParameters(ruleName, expected, actual, source) {\n return createError(\n 'Wrong number of parameters for rule ' +\n ruleName +\n ' (expected ' +\n expected +\n ', got ' +\n actual +\n ')',\n source\n );\n}\n\n// Wrong number of arguments\n\nfunction wrongNumberOfArguments(ruleName, expected, actual, expr) {\n return createError(\n 'Wrong number of arguments for rule ' +\n ruleName +\n ' (expected ' +\n expected +\n ', got ' +\n actual +\n ')',\n expr.source\n );\n}\n\n// Duplicate parameter names\n\nfunction duplicateParameterNames(ruleName, duplicates, source) {\n return createError(\n 'Duplicate parameter names in rule ' + ruleName + ': ' + duplicates.join(', '),\n source\n );\n}\n\n// Invalid parameter expression\n\nfunction invalidParameter(ruleName, expr) {\n return createError(\n 'Invalid parameter to rule ' +\n ruleName +\n ': ' +\n expr +\n ' has arity ' +\n expr.getArity() +\n ', but parameter expressions must have arity 1',\n expr.source\n );\n}\n\n// Application of syntactic rule from lexical rule\n\nconst syntacticVsLexicalNote =\n 'NOTE: A _syntactic rule_ is a rule whose name begins with a capital letter. ' +\n 'See https://git.io/JiYgP for more details.';\n\nfunction applicationOfSyntacticRuleFromLexicalContext(ruleName, applyExpr) {\n return createError(\n 'Cannot apply syntactic rule ' + ruleName + ' from here (inside a lexical context)',\n applyExpr.source\n );\n}\n\n// Lexical rule application used with experimentalApplySyntactic\n\nfunction experimentalApplySyntacticWithLexicalRuleApplication(applyExpr) {\n const {ruleName} = applyExpr;\n return createError(\n `experimentalApplySyntactic is for syntactic rules, but '${ruleName}' is a lexical rule. ` +\n syntacticVsLexicalNote,\n applyExpr.source\n );\n}\n\n// Incorrect argument type\n\nfunction incorrectArgumentType(expectedType, expr) {\n return createError('Incorrect argument type: expected ' + expectedType, expr.source);\n}\n\n// Multiple instances of the super-splice operator (`...`) in the rule body.\n\nfunction multipleSuperSplices(expr) {\n return createError(\"'...' can appear at most once in a rule body\", expr.source);\n}\n\n// ----------------- Kleene operators -----------------\n\nfunction kleeneExprHasNullableOperand(kleeneExpr, applicationStack) {\n const actuals =\n applicationStack.length > 0 ? applicationStack[applicationStack.length - 1].args : [];\n const expr = kleeneExpr.expr.substituteParams(actuals);\n let message =\n 'Nullable expression ' +\n expr +\n \" is not allowed inside '\" +\n kleeneExpr.operator +\n \"' (possible infinite loop)\";\n if (applicationStack.length > 0) {\n const stackTrace = applicationStack\n .map(app => new pexprs.Apply(app.ruleName, app.args))\n .join('\\n');\n message += '\\nApplication stack (most recent application last):\\n' + stackTrace;\n }\n return createError(message, kleeneExpr.expr.source);\n}\n\n// ----------------- arity -----------------\n\nfunction inconsistentArity(ruleName, expected, actual, expr) {\n return createError(\n 'Rule ' +\n ruleName +\n ' involves an alternation which has inconsistent arity ' +\n '(expected ' +\n expected +\n ', got ' +\n actual +\n ')',\n expr.source\n );\n}\n\n// ----------------- properties -----------------\n\nfunction duplicatePropertyNames(duplicates) {\n return createError('Object pattern has duplicate property names: ' + duplicates.join(', '));\n}\n\n// ----------------- constructors -----------------\n\nfunction invalidConstructorCall(grammar, ctorName, children) {\n return createError(\n 'Attempt to invoke constructor ' + ctorName + ' with invalid or unexpected arguments'\n );\n}\n\n// ----------------- convenience -----------------\n\nfunction multipleErrors(errors) {\n const messages = errors.map(e => e.message);\n return createError(['Errors:'].concat(messages).join('\\n- '), errors[0].interval);\n}\n\n// ----------------- semantic -----------------\n\nfunction missingSemanticAction(ctorName, name, type, stack) {\n let stackTrace = stack\n .slice(0, -1)\n .map(info => {\n const ans = ' ' + info[0].name + ' > ' + info[1];\n return info.length === 3 ? ans + \" for '\" + info[2] + \"'\" : ans;\n })\n .join('\\n');\n stackTrace += '\\n ' + name + ' > ' + ctorName;\n\n let moreInfo = '';\n if (ctorName === '_iter') {\n moreInfo = [\n '\\nNOTE: as of Ohm v16, there is no default action for iteration nodes — see ',\n ' https://git.io/JRwtG for details.',\n ].join('\\n');\n }\n\n const message = [\n `Missing semantic action for '${ctorName}' in ${type} '${name}'.${moreInfo}`,\n 'Action stack (most recent call last):',\n stackTrace,\n ].join('\\n');\n\n const e = createError(message);\n e.name = 'missingSemanticAction';\n return e;\n}\n\n// --------------------------------------------------------------------\n// Exports\n// --------------------------------------------------------------------\n\nmodule.exports = {\n applicationOfSyntacticRuleFromLexicalContext,\n experimentalApplySyntacticWithLexicalRuleApplication,\n cannotExtendUndeclaredRule,\n cannotOverrideUndeclaredRule,\n duplicateGrammarDeclaration,\n duplicateParameterNames,\n duplicatePropertyNames,\n duplicateRuleDeclaration,\n inconsistentArity,\n incorrectArgumentType,\n intervalSourcesDontMatch,\n invalidConstructorCall,\n invalidParameter,\n grammarSyntaxError,\n kleeneExprHasNullableOperand,\n missingSemanticAction,\n multipleSuperSplices,\n undeclaredGrammar,\n undeclaredRule,\n wrongNumberOfArguments,\n wrongNumberOfParameters,\n\n throwErrors(errors) {\n if (errors.length === 1) {\n throw errors[0];\n }\n if (errors.length > 1) {\n throw multipleErrors(errors);\n }\n },\n};\n","'use strict';\n\n// --------------------------------------------------------------------\n// Imports\n// --------------------------------------------------------------------\n\nconst common = require('./common');\n\n// --------------------------------------------------------------------\n// Private stuff\n// --------------------------------------------------------------------\n\n// Given an array of numbers `arr`, return an array of the numbers as strings,\n// right-justified and padded to the same length.\nfunction padNumbersToEqualLength(arr) {\n let maxLen = 0;\n const strings = arr.map(n => {\n const str = n.toString();\n maxLen = Math.max(maxLen, str.length);\n return str;\n });\n return strings.map(s => common.padLeft(s, maxLen));\n}\n\n// Produce a new string that would be the result of copying the contents\n// of the string `src` onto `dest` at offset `offest`.\nfunction strcpy(dest, src, offset) {\n const origDestLen = dest.length;\n const start = dest.slice(0, offset);\n const end = dest.slice(offset + src.length);\n return (start + src + end).substr(0, origDestLen);\n}\n\n// Casts the underlying lineAndCol object to a formatted message string,\n// highlighting `ranges`.\nfunction lineAndColumnToMessage(...ranges) {\n const lineAndCol = this;\n const {offset} = lineAndCol;\n const {repeatStr} = common;\n\n const sb = new common.StringBuffer();\n sb.append('Line ' + lineAndCol.lineNum + ', col ' + lineAndCol.colNum + ':\\n');\n\n // An array of the previous, current, and next line numbers as strings of equal length.\n const lineNumbers = padNumbersToEqualLength([\n lineAndCol.prevLine == null ? 0 : lineAndCol.lineNum - 1,\n lineAndCol.lineNum,\n lineAndCol.nextLine == null ? 0 : lineAndCol.lineNum + 1,\n ]);\n\n // Helper for appending formatting input lines to the buffer.\n const appendLine = (num, content, prefix) => {\n sb.append(prefix + lineNumbers[num] + ' | ' + content + '\\n');\n };\n\n // Include the previous line for context if possible.\n if (lineAndCol.prevLine != null) {\n appendLine(0, lineAndCol.prevLine, ' ');\n }\n // Line that the error occurred on.\n appendLine(1, lineAndCol.line, '> ');\n\n // Build up the line that points to the offset and possible indicates one or more ranges.\n // Start with a blank line, and indicate each range by overlaying a string of `~` chars.\n const lineLen = lineAndCol.line.length;\n let indicationLine = repeatStr(' ', lineLen + 1);\n for (let i = 0; i < ranges.length; ++i) {\n let startIdx = ranges[i][0];\n let endIdx = ranges[i][1];\n common.assert(startIdx >= 0 && startIdx <= endIdx, 'range start must be >= 0 and <= end');\n\n const lineStartOffset = offset - lineAndCol.colNum + 1;\n startIdx = Math.max(0, startIdx - lineStartOffset);\n endIdx = Math.min(endIdx - lineStartOffset, lineLen);\n\n indicationLine = strcpy(indicationLine, repeatStr('~', endIdx - startIdx), startIdx);\n }\n const gutterWidth = 2 + lineNumbers[1].length + 3;\n sb.append(repeatStr(' ', gutterWidth));\n indicationLine = strcpy(indicationLine, '^', lineAndCol.colNum - 1);\n sb.append(indicationLine.replace(/ +$/, '') + '\\n');\n\n // Include the next line for context if possible.\n if (lineAndCol.nextLine != null) {\n appendLine(2, lineAndCol.nextLine, ' ');\n }\n return sb.contents();\n}\n\n// --------------------------------------------------------------------\n// Exports\n// --------------------------------------------------------------------\n\nlet builtInRulesCallbacks = [];\n\n// Since Grammar.BuiltInRules is bootstrapped, most of Ohm can't directly depend it.\n// This function allows modules that do depend on the built-in rules to register a callback\n// that will be called later in the initialization process.\nexports.awaitBuiltInRules = cb => {\n builtInRulesCallbacks.push(cb);\n};\n\nexports.announceBuiltInRules = grammar => {\n builtInRulesCallbacks.forEach(cb => {\n cb(grammar);\n });\n builtInRulesCallbacks = null;\n};\n\n// Return an object with the line and column information for the given\n// offset in `str`.\nexports.getLineAndColumn = (str, offset) => {\n let lineNum = 1;\n let colNum = 1;\n\n let currOffset = 0;\n let lineStartOffset = 0;\n\n let nextLine = null;\n let prevLine = null;\n let prevLineStartOffset = -1;\n\n while (currOffset < offset) {\n const c = str.charAt(currOffset++);\n if (c === '\\n') {\n lineNum++;\n colNum = 1;\n prevLineStartOffset = lineStartOffset;\n lineStartOffset = currOffset;\n } else if (c !== '\\r') {\n colNum++;\n }\n }\n\n // Find the end of the target line.\n let lineEndOffset = str.indexOf('\\n', lineStartOffset);\n if (lineEndOffset === -1) {\n lineEndOffset = str.length;\n } else {\n // Get the next line.\n const nextLineEndOffset = str.indexOf('\\n', lineEndOffset + 1);\n nextLine =\n nextLineEndOffset === -1 ?\n str.slice(lineEndOffset) :\n str.slice(lineEndOffset, nextLineEndOffset);\n // Strip leading and trailing EOL char(s).\n nextLine = nextLine.replace(/^\\r?\\n/, '').replace(/\\r$/, '');\n }\n\n // Get the previous line.\n if (prevLineStartOffset >= 0) {\n // Strip trailing EOL char(s).\n prevLine = str.slice(prevLineStartOffset, lineStartOffset).replace(/\\r?\\n$/, '');\n }\n\n // Get the target line, stripping a trailing carriage return if necessary.\n const line = str.slice(lineStartOffset, lineEndOffset).replace(/\\r$/, '');\n\n return {\n offset,\n lineNum,\n colNum,\n line,\n prevLine,\n nextLine,\n toString: lineAndColumnToMessage,\n };\n};\n\n// Return a nicely-formatted string describing the line and column for the\n// given offset in `str` highlighting `ranges`.\nexports.getLineAndColumnMessage = function(str, offset, ...ranges) {\n return exports.getLineAndColumn(str, offset).toString(...ranges);\n};\n\nexports.uniqueId = (() => {\n let idCounter = 0;\n return prefix => '' + prefix + idCounter++;\n})();\n","'use strict';\n\n// --------------------------------------------------------------------\n// Imports\n// --------------------------------------------------------------------\n\nconst common = require('./common');\nconst errors = require('./errors');\nconst pexprs = require('./pexprs');\n\n// --------------------------------------------------------------------\n// Operations\n// --------------------------------------------------------------------\n\npexprs.PExpr.prototype.assertChoicesHaveUniformArity = common.abstract(\n 'assertChoicesHaveUniformArity'\n);\n\npexprs.any.assertChoicesHaveUniformArity =\n pexprs.end.assertChoicesHaveUniformArity =\n pexprs.Terminal.prototype.assertChoicesHaveUniformArity =\n pexprs.Range.prototype.assertChoicesHaveUniformArity =\n pexprs.Param.prototype.assertChoicesHaveUniformArity =\n pexprs.Lex.prototype.assertChoicesHaveUniformArity =\n pexprs.UnicodeChar.prototype.assertChoicesHaveUniformArity =\n function(ruleName) {\n // no-op\n };\n\npexprs.Alt.prototype.assertChoicesHaveUniformArity = function(ruleName) {\n if (this.terms.length === 0) {\n return;\n }\n const arity = this.terms[0].getArity();\n for (let idx = 0; idx < this.terms.length; idx++) {\n const term = this.terms[idx];\n term.assertChoicesHaveUniformArity();\n const otherArity = term.getArity();\n if (arity !== otherArity) {\n throw errors.inconsistentArity(ruleName, arity, otherArity, term);\n }\n }\n};\n\npexprs.Extend.prototype.assertChoicesHaveUniformArity = function(ruleName) {\n // Extend is a special case of Alt that's guaranteed to have exactly two\n // cases: [extensions, origBody].\n const actualArity = this.terms[0].getArity();\n const expectedArity = this.terms[1].getArity();\n if (actualArity !== expectedArity) {\n throw errors.inconsistentArity(ruleName, expectedArity, actualArity, this.terms[0]);\n }\n};\n\npexprs.Seq.prototype.assertChoicesHaveUniformArity = function(ruleName) {\n for (let idx = 0; idx < this.factors.length; idx++) {\n this.factors[idx].assertChoicesHaveUniformArity(ruleName);\n }\n};\n\npexprs.Iter.prototype.assertChoicesHaveUniformArity = function(ruleName) {\n this.expr.assertChoicesHaveUniformArity(ruleName);\n};\n\npexprs.Not.prototype.assertChoicesHaveUniformArity = function(ruleName) {\n // no-op (not required b/c the nested expr doesn't show up in the CST)\n};\n\npexprs.Lookahead.prototype.assertChoicesHaveUniformArity = function(ruleName) {\n this.expr.assertChoicesHaveUniformArity(ruleName);\n};\n\npexprs.Apply.prototype.assertChoicesHaveUniformArity = function(ruleName) {\n // The arities of the parameter expressions is required to be 1 by\n // `assertAllApplicationsAreValid()`.\n};\n","'use strict';\n\n// --------------------------------------------------------------------\n// Imports\n// --------------------------------------------------------------------\n\nconst common = require('./common');\nconst errors = require('./errors');\nconst pexprs = require('./pexprs');\n\n// --------------------------------------------------------------------\n// Operations\n// --------------------------------------------------------------------\n\npexprs.PExpr.prototype.assertIteratedExprsAreNotNullable = common.abstract(\n 'assertIteratedExprsAreNotNullable'\n);\n\npexprs.any.assertIteratedExprsAreNotNullable =\n pexprs.end.assertIteratedExprsAreNotNullable =\n pexprs.Terminal.prototype.assertIteratedExprsAreNotNullable =\n pexprs.Range.prototype.assertIteratedExprsAreNotNullable =\n pexprs.Param.prototype.assertIteratedExprsAreNotNullable =\n pexprs.UnicodeChar.prototype.assertIteratedExprsAreNotNullable =\n function(grammar) {\n // no-op\n };\n\npexprs.Alt.prototype.assertIteratedExprsAreNotNullable = function(grammar) {\n for (let idx = 0; idx < this.terms.length; idx++) {\n this.terms[idx].assertIteratedExprsAreNotNullable(grammar);\n }\n};\n\npexprs.Seq.prototype.assertIteratedExprsAreNotNullable = function(grammar) {\n for (let idx = 0; idx < this.factors.length; idx++) {\n this.factors[idx].assertIteratedExprsAreNotNullable(grammar);\n }\n};\n\npexprs.Iter.prototype.assertIteratedExprsAreNotNullable = function(grammar) {\n // Note: this is the implementation of this method for `Star` and `Plus` expressions.\n // It is overridden for `Opt` below.\n this.expr.assertIteratedExprsAreNotNullable(grammar);\n if (this.expr.isNullable(grammar)) {\n throw errors.kleeneExprHasNullableOperand(this, []);\n }\n};\n\npexprs.Opt.prototype.assertIteratedExprsAreNotNullable =\n pexprs.Not.prototype.assertIteratedExprsAreNotNullable =\n pexprs.Lookahead.prototype.assertIteratedExprsAreNotNullable =\n pexprs.Lex.prototype.assertIteratedExprsAreNotNullable =\n function(grammar) {\n this.expr.assertIteratedExprsAreNotNullable(grammar);\n };\n\npexprs.Apply.prototype.assertIteratedExprsAreNotNullable = function(grammar) {\n this.args.forEach(arg => {\n arg.assertIteratedExprsAreNotNullable(grammar);\n });\n};\n","'use strict';\n\n// --------------------------------------------------------------------\n// Imports\n// --------------------------------------------------------------------\n\nconst {assert} = require('./common');\nconst errors = require('./errors');\nconst util = require('./util');\n\n// --------------------------------------------------------------------\n// Private stuff\n// --------------------------------------------------------------------\n\nfunction Interval(sourceString, startIdx, endIdx) {\n this.sourceString = sourceString;\n this.startIdx = startIdx;\n this.endIdx = endIdx;\n}\n\nInterval.coverage = function(firstInterval, ...intervals) {\n let {startIdx, endIdx} = firstInterval;\n for (const interval of intervals) {\n if (interval.sourceString !== firstInterval.sourceString) {\n throw errors.intervalSourcesDontMatch();\n } else {\n startIdx = Math.min(startIdx, interval.startIdx);\n endIdx = Math.max(endIdx, interval.endIdx);\n }\n }\n return new Interval(firstInterval.sourceString, startIdx, endIdx);\n};\n\nInterval.prototype = {\n coverageWith(...intervals) {\n return Interval.coverage(...intervals, this);\n },\n\n collapsedLeft() {\n return new Interval(this.sourceString, this.startIdx, this.startIdx);\n },\n\n collapsedRight() {\n return new Interval(this.sourceString, this.endIdx, this.endIdx);\n },\n\n getLineAndColumn() {\n return util.getLineAndColumn(this.sourceString, this.startIdx);\n },\n\n getLineAndColumnMessage() {\n const range = [this.startIdx, this.endIdx];\n return util.getLineAndColumnMessage(this.sourceString, this.startIdx, range);\n },\n\n // Returns an array of 0, 1, or 2 intervals that represents the result of the\n // interval difference operation.\n minus(that) {\n if (this.sourceString !== that.sourceString) {\n throw errors.intervalSourcesDontMatch();\n } else if (this.startIdx === that.startIdx && this.endIdx === that.endIdx) {\n // `this` and `that` are the same interval!\n return [];\n } else if (this.startIdx < that.startIdx && that.endIdx < this.endIdx) {\n // `that` splits `this` into two intervals\n return [\n new Interval(this.sourceString, this.startIdx, that.startIdx),\n new Interval(this.sourceString, that.endIdx, this.endIdx),\n ];\n } else if (this.startIdx < that.endIdx && that.endIdx < this.endIdx) {\n // `that` contains a prefix of `this`\n return [new Interval(this.sourceString, that.endIdx, this.endIdx)];\n } else if (this.startIdx < that.startIdx && that.startIdx < this.endIdx) {\n // `that` contains a suffix of `this`\n return [new Interval(this.sourceString, this.startIdx, that.startIdx)];\n } else {\n // `that` and `this` do not overlap\n return [this];\n }\n },\n\n // Returns a new Interval that has the same extent as this one, but which is relative\n // to `that`, an Interval that fully covers this one.\n relativeTo(that) {\n if (this.sourceString !== that.sourceString) {\n throw errors.intervalSourcesDontMatch();\n }\n assert(\n this.startIdx >= that.startIdx && this.endIdx <= that.endIdx,\n 'other interval does not cover this one'\n );\n return new Interval(\n this.sourceString,\n this.startIdx - that.startIdx,\n this.endIdx - that.startIdx\n );\n },\n\n // Returns a new Interval which contains the same contents as this one,\n // but with whitespace trimmed from both ends. (This only makes sense when\n // the input stream is a string.)\n trimmed() {\n const {contents} = this;\n const startIdx = this.startIdx + contents.match(/^\\s*/)[0].length;\n const endIdx = this.endIdx - contents.match(/\\s*$/)[0].length;\n return new Interval(this.sourceString, startIdx, endIdx);\n },\n\n subInterval(offset, len) {\n const newStartIdx = this.startIdx + offset;\n return new Interval(this.sourceString, newStartIdx, newStartIdx + len);\n },\n};\n\nObject.defineProperties(Interval.prototype, {\n contents: {\n get() {\n if (this._contents === undefined) {\n this._contents = this.sourceString.slice(this.startIdx, this.endIdx);\n }\n return this._contents;\n },\n enumerable: true,\n },\n length: {\n get() {\n return this.endIdx - this.startIdx;\n },\n enumerable: true,\n },\n});\n\n// --------------------------------------------------------------------\n// Exports\n// --------------------------------------------------------------------\n\nmodule.exports = Interval;\n","'use strict';\n\n// --------------------------------------------------------------------\n// Imports\n// --------------------------------------------------------------------\n\nconst Interval = require('./Interval');\nconst common = require('./common');\n\n// --------------------------------------------------------------------\n// Private stuff\n// --------------------------------------------------------------------\n\n// Unicode characters that are used in the `toString` output.\nconst BALLOT_X = '\\u2717';\nconst CHECK_MARK = '\\u2713';\nconst DOT_OPERATOR = '\\u22C5';\nconst RIGHTWARDS_DOUBLE_ARROW = '\\u21D2';\nconst SYMBOL_FOR_HORIZONTAL_TABULATION = '\\u2409';\nconst SYMBOL_FOR_LINE_FEED = '\\u240A';\nconst SYMBOL_FOR_CARRIAGE_RETURN = '\\u240D';\n\nconst Flags = {\n succeeded: 1 << 0,\n isRootNode: 1 << 1,\n isImplicitSpaces: 1 << 2,\n isMemoized: 1 << 3,\n isHeadOfLeftRecursion: 1 << 4,\n terminatesLR: 1 << 5,\n};\n\nfunction spaces(n) {\n return common.repeat(' ', n).join('');\n}\n\n// Return a string representation of a portion of `input` at offset `pos`.\n// The result will contain exactly `len` characters.\nfunction getInputExcerpt(input, pos, len) {\n const excerpt = asEscapedString(input.slice(pos, pos + len));\n\n // Pad the output if necessary.\n if (excerpt.length < len) {\n return excerpt + common.repeat(' ', len - excerpt.length).join('');\n }\n return excerpt;\n}\n\nfunction asEscapedString(obj) {\n if (typeof obj === 'string') {\n // Replace non-printable characters with visible symbols.\n return obj\n .replace(/ /g, DOT_OPERATOR)\n .replace(/\\t/g, SYMBOL_FOR_HORIZONTAL_TABULATION)\n .replace(/\\n/g, SYMBOL_FOR_LINE_FEED)\n .replace(/\\r/g, SYMBOL_FOR_CARRIAGE_RETURN);\n }\n return String(obj);\n}\n\n// ----------------- Trace -----------------\n\nfunction Trace(input, pos1, pos2, expr, succeeded, bindings, optChildren) {\n this.input = input;\n this.pos = this.pos1 = pos1;\n this.pos2 = pos2;\n this.source = new Interval(input, pos1, pos2);\n this.expr = expr;\n this.bindings = bindings;\n this.children = optChildren || [];\n this.terminatingLREntry = null;\n\n this._flags = succeeded ? Flags.succeeded : 0;\n}\n\n// A value that can be returned from visitor functions to indicate that a\n// node should not be recursed into.\nTrace.prototype.SKIP = {};\n\nObject.defineProperty(Trace.prototype, 'displayString', {\n get() {\n return this.expr.toDisplayString();\n },\n});\n\n// For convenience, create a getter and setter for the boolean flags in `Flags`.\nObject.keys(Flags).forEach(name => {\n const mask = Flags[name];\n Object.defineProperty(Trace.prototype, name, {\n get() {\n return (this._flags & mask) !== 0;\n },\n set(val) {\n if (val) {\n this._flags |= mask;\n } else {\n this._flags &= ~mask;\n }\n },\n });\n});\n\nTrace.prototype.clone = function() {\n return this.cloneWithExpr(this.expr);\n};\n\nTrace.prototype.cloneWithExpr = function(expr) {\n const ans = new Trace(\n this.input,\n this.pos,\n this.pos2,\n expr,\n this.succeeded,\n this.bindings,\n this.children\n );\n\n ans.isHeadOfLeftRecursion = this.isHeadOfLeftRecursion;\n ans.isImplicitSpaces = this.isImplicitSpaces;\n ans.isMemoized = this.isMemoized;\n ans.isRootNode = this.isRootNode;\n ans.terminatesLR = this.terminatesLR;\n ans.terminatingLREntry = this.terminatingLREntry;\n return ans;\n};\n\n// Record the trace information for the terminating condition of the LR loop.\nTrace.prototype.recordLRTermination = function(ruleBodyTrace, value) {\n this.terminatingLREntry = new Trace(\n this.input,\n this.pos,\n this.pos2,\n this.expr,\n false,\n [value],\n [ruleBodyTrace]\n );\n this.terminatingLREntry.terminatesLR = true;\n};\n\n// Recursively traverse this trace node and all its descendents, calling a visitor function\n// for each node that is visited. If `vistorObjOrFn` is an object, then its 'enter' property\n// is a function to call before visiting the children of a node, and its 'exit' property is\n// a function to call afterwards. If `visitorObjOrFn` is a function, it represents the 'enter'\n// function.\n//\n// The functions are called with three arguments: the Trace node, its parent Trace, and a number\n// representing the depth of the node in the tree. (The root node has depth 0.) `optThisArg`, if\n// specified, is the value to use for `this` when executing the visitor functions.\nTrace.prototype.walk = function(visitorObjOrFn, optThisArg) {\n let visitor = visitorObjOrFn;\n if (typeof visitor === 'function') {\n visitor = {enter: visitor};\n }\n\n function _walk(node, parent, depth) {\n let recurse = true;\n if (visitor.enter) {\n if (visitor.enter.call(optThisArg, node, parent, depth) === Trace.prototype.SKIP) {\n recurse = false;\n }\n }\n if (recurse) {\n node.children.forEach(child => {\n _walk(child, node, depth + 1);\n });\n if (visitor.exit) {\n visitor.exit.call(optThisArg, node, parent, depth);\n }\n }\n }\n if (this.isRootNode) {\n // Don't visit the root node itself, only its children.\n this.children.forEach(c => {\n _walk(c, null, 0);\n });\n } else {\n _walk(this, null, 0);\n }\n};\n\n// Return a string representation of the trace.\n// Sample:\n// 12⋅+⋅2⋅*⋅3 ✓ exp ⇒ \"12\"\n// 12⋅+⋅2⋅*⋅3 ✓ addExp (LR) ⇒ \"12\"\n// 12⋅+⋅2⋅*⋅3 ✗ addExp_plus\nTrace.prototype.toString = function() {\n const sb = new common.StringBuffer();\n this.walk((node, parent, depth) => {\n if (!node) {\n return this.SKIP;\n }\n const ctorName = node.expr.constructor.name;\n // Don't print anything for Alt nodes.\n if (ctorName === 'Alt') {\n return; // eslint-disable-line consistent-return\n }\n sb.append(getInputExcerpt(node.input, node.pos, 10) + spaces(depth * 2 + 1));\n sb.append((node.succeeded ? CHECK_MARK : BALLOT_X) + ' ' + node.displayString);\n if (node.isHeadOfLeftRecursion) {\n sb.append(' (LR)');\n }\n if (node.succeeded) {\n const contents = asEscapedString(node.source.contents);\n sb.append(' ' + RIGHTWARDS_DOUBLE_ARROW + ' ');\n sb.append(typeof contents === 'string' ? '\"' + contents + '\"' : contents);\n }\n sb.append('\\n');\n });\n return sb.contents();\n};\n\n// --------------------------------------------------------------------\n// Exports\n// --------------------------------------------------------------------\n\nmodule.exports = Trace;\n","'use strict';\n\n// --------------------------------------------------------------------\n// Imports\n// --------------------------------------------------------------------\n\nconst Trace = require('./Trace');\nconst common = require('./common');\nconst errors = require('./errors');\nconst nodes = require('./nodes');\nconst pexprs = require('./pexprs');\n\nconst {TerminalNode} = nodes;\nconst {NonterminalNode} = nodes;\nconst {IterationNode} = nodes;\n\n// --------------------------------------------------------------------\n// Operations\n// --------------------------------------------------------------------\n\n/*\n Evaluate the expression and return `true` if it succeeds, `false` otherwise. This method should\n only be called directly by `State.prototype.eval(expr)`, which also updates the data structures\n that are used for tracing. (Making those updates in a method of `State` enables the trace-specific\n data structures to be \"secrets\" of that class, which is good for modularity.)\n\n The contract of this method is as follows:\n * When the return value is `true`,\n - the state object will have `expr.getArity()` more bindings than it did before the call.\n * When the return value is `false`,\n - the state object may have more bindings than it did before the call, and\n - its input stream's position may be anywhere.\n\n Note that `State.prototype.eval(expr)`, unlike this method, guarantees that neither the state\n object's bindings nor its input stream's position will change if the expression fails to match.\n*/\npexprs.PExpr.prototype.eval = common.abstract('eval'); // function(state) { ... }\n\npexprs.any.eval = function(state) {\n const {inputStream} = state;\n const origPos = inputStream.pos;\n const ch = inputStream.next();\n if (ch) {\n state.pushBinding(new TerminalNode(state.grammar, ch), origPos);\n return true;\n } else {\n state.processFailure(origPos, this);\n return false;\n }\n};\n\npexprs.end.eval = function(state) {\n const {inputStream} = state;\n const origPos = inputStream.pos;\n if (inputStream.atEnd()) {\n state.pushBinding(new TerminalNode(state.grammar, undefined), origPos);\n return true;\n } else {\n state.processFailure(origPos, this);\n return false;\n }\n};\n\npexprs.Terminal.prototype.eval = function(state) {\n const {inputStream} = state;\n const origPos = inputStream.pos;\n if (!inputStream.matchString(this.obj)) {\n state.processFailure(origPos, this);\n return false;\n } else {\n state.pushBinding(new TerminalNode(state.grammar, this.obj), origPos);\n return true;\n }\n};\n\npexprs.Range.prototype.eval = function(state) {\n const {inputStream} = state;\n const origPos = inputStream.pos;\n const ch = inputStream.next();\n if (ch && this.from <= ch && ch <= this.to) {\n state.pushBinding(new TerminalNode(state.grammar, ch), origPos);\n return true;\n } else {\n state.processFailure(origPos, this);\n return false;\n }\n};\n\npexprs.Param.prototype.eval = function(state) {\n return state.eval(state.currentApplication().args[this.index]);\n};\n\npexprs.Lex.prototype.eval = function(state) {\n state.enterLexifiedContext();\n const ans = state.eval(this.expr);\n state.exitLexifiedContext();\n return ans;\n};\n\npexprs.Alt.prototype.eval = function(state) {\n for (let idx = 0; idx < this.terms.length; idx++) {\n if (state.eval(this.terms[idx])) {\n return true;\n }\n }\n return false;\n};\n\npexprs.Seq.prototype.eval = function(state) {\n for (let idx = 0; idx < this.factors.length; idx++) {\n const factor = this.factors[idx];\n if (!state.eval(factor)) {\n return false;\n }\n }\n return true;\n};\n\npexprs.Iter.prototype.eval = function(state) {\n const {inputStream} = state;\n const origPos = inputStream.pos;\n const arity = this.getArity();\n const cols = [];\n const colOffsets = [];\n while (cols.length < arity) {\n cols.push([]);\n colOffsets.push([]);\n }\n\n let numMatches = 0;\n let prevPos = origPos;\n let idx;\n while (numMatches < this.maxNumMatches && state.eval(this.expr)) {\n if (inputStream.pos === prevPos) {\n throw errors.kleeneExprHasNullableOperand(this, state._applicationStack);\n }\n prevPos = inputStream.pos;\n numMatches++;\n const row = state._bindings.splice(state._bindings.length - arity, arity);\n const rowOffsets = state._bindingOffsets.splice(\n state._bindingOffsets.length - arity,\n arity\n );\n for (idx = 0; idx < row.length; idx++) {\n cols[idx].push(row[idx]);\n colOffsets[idx].push(rowOffsets[idx]);\n }\n }\n if (numMatches < this.minNumMatches) {\n return false;\n }\n let offset = state.posToOffset(origPos);\n let matchLength = 0;\n if (numMatches > 0) {\n const lastCol = cols[arity - 1];\n const lastColOffsets = colOffsets[arity - 1];\n\n const endOffset =\n lastColOffsets[lastColOffsets.length - 1] + lastCol[lastCol.length - 1].matchLength;\n offset = colOffsets[0][0];\n matchLength = endOffset - offset;\n }\n const isOptional = this instanceof pexprs.Opt;\n for (idx = 0; idx < cols.length; idx++) {\n state._bindings.push(\n new IterationNode(state.grammar, cols[idx], colOffsets[idx], matchLength, isOptional)\n );\n state._bindingOffsets.push(offset);\n }\n return true;\n};\n\npexprs.Not.prototype.eval = function(state) {\n /*\n TODO:\n - Right now we're just throwing away all of the failures that happen inside a `not`, and\n recording `this` as a failed expression.\n - Double negation should be equivalent to lookahead, but that's not the case right now wrt\n failures. E.g., ~~'foo' produces a failure for ~~'foo', but maybe it should produce\n a failure for 'foo' instead.\n */\n\n const {inputStream} = state;\n const origPos = inputStream.pos;\n state.pushFailuresInfo();\n\n const ans = state.eval(this.expr);\n\n state.popFailuresInfo();\n if (ans) {\n state.processFailure(origPos, this);\n return false;\n }\n\n inputStream.pos = origPos;\n return true;\n};\n\npexprs.Lookahead.prototype.eval = function(state) {\n const {inputStream} = state;\n const origPos = inputStream.pos;\n if (state.eval(this.expr)) {\n inputStream.pos = origPos;\n return true;\n } else {\n return false;\n }\n};\n\npexprs.Apply.prototype.eval = function(state) {\n const caller = state.currentApplication();\n const actuals = caller ? caller.args : [];\n const app = this.substituteParams(actuals);\n\n const posInfo = state.getCurrentPosInfo();\n if (posInfo.isActive(app)) {\n // This rule is already active at this position, i.e., it is left-recursive.\n return app.handleCycle(state);\n }\n\n const memoKey = app.toMemoKey();\n const memoRec = posInfo.memo[memoKey];\n\n if (memoRec && posInfo.shouldUseMemoizedResult(memoRec)) {\n if (state.hasNecessaryInfo(memoRec)) {\n return state.useMemoizedResult(state.inputStream.pos, memoRec);\n }\n delete posInfo.memo[memoKey];\n }\n return app.reallyEval(state);\n};\n\npexprs.Apply.prototype.handleCycle = function(state) {\n const posInfo = state.getCurrentPosInfo();\n const {currentLeftRecursion} = posInfo;\n const memoKey = this.toMemoKey();\n let memoRec = posInfo.memo[memoKey];\n\n if (currentLeftRecursion && currentLeftRecursion.headApplication.toMemoKey() === memoKey) {\n // We already know about this left recursion, but it's possible there are \"involved\n // applications\" that we don't already know about, so...\n memoRec.updateInvolvedApplicationMemoKeys();\n } else if (!memoRec) {\n // New left recursion detected! Memoize a failure to try to get a seed parse.\n memoRec = posInfo.memoize(memoKey, {\n matchLength: 0,\n examinedLength: 0,\n value: false,\n rightmostFailureOffset: -1,\n });\n posInfo.startLeftRecursion(this, memoRec);\n }\n return state.useMemoizedResult(state.inputStream.pos, memoRec);\n};\n\npexprs.Apply.prototype.reallyEval = function(state) {\n const {inputStream} = state;\n const origPos = inputStream.pos;\n const origPosInfo = state.getCurrentPosInfo();\n const ruleInfo = state.grammar.rules[this.ruleName];\n const {body} = ruleInfo;\n const {description} = ruleInfo;\n\n state.enterApplication(origPosInfo, this);\n\n if (description) {\n state.pushFailuresInfo();\n }\n\n // Reset the input stream's examinedLength property so that we can track\n // the examined length of this particular application.\n const origInputStreamExaminedLength = inputStream.examinedLength;\n inputStream.examinedLength = 0;\n\n let value = this.evalOnce(body, state);\n const currentLR = origPosInfo.currentLeftRecursion;\n const memoKey = this.toMemoKey();\n const isHeadOfLeftRecursion = currentLR && currentLR.headApplication.toMemoKey() === memoKey;\n let memoRec;\n\n if (isHeadOfLeftRecursion) {\n value = this.growSeedResult(body, state, origPos, currentLR, value);\n origPosInfo.endLeftRecursion();\n memoRec = currentLR;\n memoRec.examinedLength = inputStream.examinedLength - origPos;\n memoRec.rightmostFailureOffset = state._getRightmostFailureOffset();\n origPosInfo.memoize(memoKey, memoRec); // updates origPosInfo's maxExaminedLength\n } else if (!currentLR || !currentLR.isInvolved(memoKey)) {\n // This application is not involved in left recursion, so it's ok to memoize it.\n memoRec = origPosInfo.memoize(memoKey, {\n matchLength: inputStream.pos - origPos,\n examinedLength: inputStream.examinedLength - origPos,\n value,\n failuresAtRightmostPosition: state.cloneRecordedFailures(),\n rightmostFailureOffset: state._getRightmostFailureOffset(),\n });\n }\n const succeeded = !!value;\n\n if (description) {\n state.popFailuresInfo();\n if (!succeeded) {\n state.processFailure(origPos, this);\n }\n if (memoRec) {\n memoRec.failuresAtRightmostPosition = state.cloneRecordedFailures();\n }\n }\n\n // Record trace information in the memo table, so that it is available if the memoized result\n // is used later.\n if (state.isTracing() && memoRec) {\n const entry = state.getTraceEntry(origPos, this, succeeded, succeeded ? [value] : []);\n if (isHeadOfLeftRecursion) {\n common.assert(entry.terminatingLREntry != null || !succeeded);\n entry.isHeadOfLeftRecursion = true;\n }\n memoRec.traceEntry = entry;\n }\n\n // Fix the input stream's examinedLength -- it should be the maximum examined length\n // across all applications, not just this one.\n inputStream.examinedLength = Math.max(\n inputStream.examinedLength,\n origInputStreamExaminedLength\n );\n\n state.exitApplication(origPosInfo, value);\n\n return succeeded;\n};\n\npexprs.Apply.prototype.evalOnce = function(expr, state) {\n const {inputStream} = state;\n const origPos = inputStream.pos;\n\n if (state.eval(expr)) {\n const arity = expr.getArity();\n const bindings = state._bindings.splice(state._bindings.length - arity, arity);\n const offsets = state._bindingOffsets.splice(state._bindingOffsets.length - arity, arity);\n return new NonterminalNode(\n state.grammar,\n this.ruleName,\n bindings,\n offsets,\n inputStream.pos - origPos\n );\n } else {\n return false;\n }\n};\n\npexprs.Apply.prototype.growSeedResult = function(body, state, origPos, lrMemoRec, newValue) {\n if (!newValue) {\n return false;\n }\n\n const {inputStream} = state;\n\n while (true) {\n lrMemoRec.matchLength = inputStream.pos - origPos;\n lrMemoRec.value = newValue;\n lrMemoRec.failuresAtRightmostPosition = state.cloneRecordedFailures();\n\n if (state.isTracing()) {\n // Before evaluating the body again, add a trace node for this application to the memo entry.\n // Its only child is a copy of the trace node from `newValue`, which will always be the last\n // element in `state.trace`.\n const seedTrace = state.trace[state.trace.length - 1];\n lrMemoRec.traceEntry = new Trace(\n state.input,\n origPos,\n inputStream.pos,\n this,\n true,\n [newValue],\n [seedTrace.clone()]\n );\n }\n inputStream.pos = origPos;\n newValue = this.evalOnce(body, state);\n if (inputStream.pos - origPos <= lrMemoRec.matchLength) {\n break;\n }\n if (state.isTracing()) {\n state.trace.splice(-2, 1); // Drop the trace for the old seed.\n }\n }\n if (state.isTracing()) {\n // The last entry is for an unused result -- pop it and save it in the \"real\" entry.\n lrMemoRec.traceEntry.recordLRTermination(state.trace.pop(), newValue);\n }\n inputStream.pos = origPos + lrMemoRec.matchLength;\n return lrMemoRec.value;\n};\n\npexprs.UnicodeChar.prototype.eval = function(state) {\n const {inputStream} = state;\n const origPos = inputStream.pos;\n const ch = inputStream.next();\n if (ch && this.pattern.test(ch)) {\n state.pushBinding(new TerminalNode(state.grammar, ch), origPos);\n return true;\n } else {\n state.processFailure(origPos, this);\n return false;\n }\n};\n","'use strict';\n\n// --------------------------------------------------------------------\n// Imports\n// --------------------------------------------------------------------\n\nconst common = require('./common');\nconst pexprs = require('./pexprs');\n\n// --------------------------------------------------------------------\n// Private stuff\n// --------------------------------------------------------------------\n\nfunction getMetaInfo(expr, grammarInterval) {\n const metaInfo = {};\n if (expr.source && grammarInterval) {\n const adjusted = expr.source.relativeTo(grammarInterval);\n metaInfo.sourceInterval = [adjusted.startIdx, adjusted.endIdx];\n }\n return metaInfo;\n}\n\n// --------------------------------------------------------------------\n// Operations\n// --------------------------------------------------------------------\n\npexprs.PExpr.prototype.outputRecipe = common.abstract('outputRecipe');\n\npexprs.any.outputRecipe = function(formals, grammarInterval) {\n return ['any', getMetaInfo(this, grammarInterval)];\n};\n\npexprs.end.outputRecipe = function(formals, grammarInterval) {\n return ['end', getMetaInfo(this, grammarInterval)];\n};\n\npexprs.Terminal.prototype.outputRecipe = function(formals, grammarInterval) {\n return ['terminal', getMetaInfo(this, grammarInterval), this.obj];\n};\n\npexprs.Range.prototype.outputRecipe = function(formals, grammarInterval) {\n return ['range', getMetaInfo(this, grammarInterval), this.from, this.to];\n};\n\npexprs.Param.prototype.outputRecipe = function(formals, grammarInterval) {\n return ['param', getMetaInfo(this, grammarInterval), this.index];\n};\n\npexprs.Alt.prototype.outputRecipe = function(formals, grammarInterval) {\n return ['alt', getMetaInfo(this, grammarInterval)].concat(\n this.terms.map(term => term.outputRecipe(formals, grammarInterval))\n );\n};\n\npexprs.Extend.prototype.outputRecipe = function(formals, grammarInterval) {\n const extension = this.terms[0]; // [extension, original]\n return extension.outputRecipe(formals, grammarInterval);\n};\n\npexprs.Splice.prototype.outputRecipe = function(formals, grammarInterval) {\n const beforeTerms = this.terms.slice(0, this.expansionPos);\n const afterTerms = this.terms.slice(this.expansionPos + 1);\n return [\n 'splice',\n getMetaInfo(this, grammarInterval),\n beforeTerms.map(term => term.outputRecipe(formals, grammarInterval)),\n afterTerms.map(term => term.outputRecipe(formals, grammarInterval)),\n ];\n};\n\npexprs.Seq.prototype.outputRecipe = function(formals, grammarInterval) {\n return ['seq', getMetaInfo(this, grammarInterval)].concat(\n this.factors.map(factor => factor.outputRecipe(formals, grammarInterval))\n );\n};\n\npexprs.Star.prototype.outputRecipe =\n pexprs.Plus.prototype.outputRecipe =\n pexprs.Opt.prototype.outputRecipe =\n pexprs.Not.prototype.outputRecipe =\n pexprs.Lookahead.prototype.outputRecipe =\n pexprs.Lex.prototype.outputRecipe =\n function(formals, grammarInterval) {\n return [\n this.constructor.name.toLowerCase(),\n getMetaInfo(this, grammarInterval),\n this.expr.outputRecipe(formals, grammarInterval),\n ];\n };\n\npexprs.Apply.prototype.outputRecipe = function(formals, grammarInterval) {\n return [\n 'app',\n getMetaInfo(this, grammarInterval),\n this.ruleName,\n this.args.map(arg => arg.outputRecipe(formals, grammarInterval)),\n ];\n};\n\npexprs.UnicodeChar.prototype.outputRecipe = function(formals, grammarInterval) {\n return ['unicodeChar', getMetaInfo(this, grammarInterval), this.category];\n};\n","'use strict';\n\n// --------------------------------------------------------------------\n// Imports\n// --------------------------------------------------------------------\n\nconst common = require('./common');\nconst pexprs = require('./pexprs');\n\n// --------------------------------------------------------------------\n// Operations\n// --------------------------------------------------------------------\n\npexprs.PExpr.prototype.getArity = common.abstract('getArity');\n\npexprs.any.getArity =\n pexprs.end.getArity =\n pexprs.Terminal.prototype.getArity =\n pexprs.Range.prototype.getArity =\n pexprs.Param.prototype.getArity =\n pexprs.Apply.prototype.getArity =\n pexprs.UnicodeChar.prototype.getArity =\n function() {\n return 1;\n };\n\npexprs.Alt.prototype.getArity = function() {\n // This is ok b/c all terms must have the same arity -- this property is\n // checked by the Grammar constructor.\n return this.terms.length === 0 ? 0 : this.terms[0].getArity();\n};\n\npexprs.Seq.prototype.getArity = function() {\n let arity = 0;\n for (let idx = 0; idx < this.factors.length; idx++) {\n arity += this.factors[idx].getArity();\n }\n return arity;\n};\n\npexprs.Iter.prototype.getArity = function() {\n return this.expr.getArity();\n};\n\npexprs.Not.prototype.getArity = function() {\n return 0;\n};\n\npexprs.Lookahead.prototype.getArity = pexprs.Lex.prototype.getArity = function() {\n return this.expr.getArity();\n};\n","'use strict';\n\n// --------------------------------------------------------------------\n// Imports\n// --------------------------------------------------------------------\n\nconst common = require('./common');\nconst pexprs = require('./pexprs');\n\n// --------------------------------------------------------------------\n// Operations\n// --------------------------------------------------------------------\n\n/*\n Called at grammar creation time to rewrite a rule body, replacing each reference to a formal\n parameter with a `Param` node. Returns a PExpr -- either a new one, or the original one if\n it was modified in place.\n*/\npexprs.PExpr.prototype.introduceParams = common.abstract('introduceParams');\n\npexprs.any.introduceParams =\n pexprs.end.introduceParams =\n pexprs.Terminal.prototype.introduceParams =\n pexprs.Range.prototype.introduceParams =\n pexprs.Param.prototype.introduceParams =\n pexprs.UnicodeChar.prototype.introduceParams =\n function(formals) {\n return this;\n };\n\npexprs.Alt.prototype.introduceParams = function(formals) {\n this.terms.forEach((term, idx, terms) => {\n terms[idx] = term.introduceParams(formals);\n });\n return this;\n};\n\npexprs.Seq.prototype.introduceParams = function(formals) {\n this.factors.forEach((factor, idx, factors) => {\n factors[idx] = factor.introduceParams(formals);\n });\n return this;\n};\n\npexprs.Iter.prototype.introduceParams =\n pexprs.Not.prototype.introduceParams =\n pexprs.Lookahead.prototype.introduceParams =\n pexprs.Lex.prototype.introduceParams =\n function(formals) {\n this.expr = this.expr.introduceParams(formals);\n return this;\n };\n\npexprs.Apply.prototype.introduceParams = function(formals) {\n const index = formals.indexOf(this.ruleName);\n if (index >= 0) {\n if (this.args.length > 0) {\n // TODO: Should this be supported? See issue #64.\n throw new Error('Parameterized rules cannot be passed as arguments to another rule.');\n }\n return new pexprs.Param(index).withSource(this.source);\n } else {\n this.args.forEach((arg, idx, args) => {\n args[idx] = arg.introduceParams(formals);\n });\n return this;\n }\n};\n","'use strict';\n\n// --------------------------------------------------------------------\n// Imports\n// --------------------------------------------------------------------\n\nconst common = require('./common');\nconst pexprs = require('./pexprs');\n\n// --------------------------------------------------------------------\n// Operations\n// --------------------------------------------------------------------\n\n// Returns `true` if this parsing expression may accept without consuming any input.\npexprs.PExpr.prototype.isNullable = function(grammar) {\n return this._isNullable(grammar, Object.create(null));\n};\n\npexprs.PExpr.prototype._isNullable = common.abstract('_isNullable');\n\npexprs.any._isNullable =\n pexprs.Range.prototype._isNullable =\n pexprs.Param.prototype._isNullable =\n pexprs.Plus.prototype._isNullable =\n pexprs.UnicodeChar.prototype._isNullable =\n function(grammar, memo) {\n return false;\n };\n\npexprs.end._isNullable = function(grammar, memo) {\n return true;\n};\n\npexprs.Terminal.prototype._isNullable = function(grammar, memo) {\n if (typeof this.obj === 'string') {\n // This is an over-simplification: it's only correct if the input is a string. If it's an array\n // or an object, then the empty string parsing expression is not nullable.\n return this.obj === '';\n } else {\n return false;\n }\n};\n\npexprs.Alt.prototype._isNullable = function(grammar, memo) {\n return this.terms.length === 0 || this.terms.some(term => term._isNullable(grammar, memo));\n};\n\npexprs.Seq.prototype._isNullable = function(grammar, memo) {\n return this.factors.every(factor => factor._isNullable(grammar, memo));\n};\n\npexprs.Star.prototype._isNullable =\n pexprs.Opt.prototype._isNullable =\n pexprs.Not.prototype._isNullable =\n pexprs.Lookahead.prototype._isNullable =\n function(grammar, memo) {\n return true;\n };\n\npexprs.Lex.prototype._isNullable = function(grammar, memo) {\n return this.expr._isNullable(grammar, memo);\n};\n\npexprs.Apply.prototype._isNullable = function(grammar, memo) {\n const key = this.toMemoKey();\n if (!Object.prototype.hasOwnProperty.call(memo, key)) {\n const {body} = grammar.rules[this.ruleName];\n const inlined = body.substituteParams(this.args);\n memo[key] = false; // Prevent infinite recursion for recursive rules.\n memo[key] = inlined._isNullable(grammar, memo);\n }\n return memo[key];\n};\n","'use strict';\n\n// --------------------------------------------------------------------\n// Imports\n// --------------------------------------------------------------------\n\nconst common = require('./common');\nconst pexprs = require('./pexprs');\n\n// --------------------------------------------------------------------\n// Operations\n// --------------------------------------------------------------------\n\n/*\n Returns a PExpr that results from recursively replacing every formal parameter (i.e., instance\n of `Param`) inside this PExpr with its actual value from `actuals` (an Array).\n\n The receiver must not be modified; a new PExpr must be returned if any replacement is necessary.\n*/\n// function(actuals) { ... }\npexprs.PExpr.prototype.substituteParams = common.abstract('substituteParams');\n\npexprs.any.substituteParams =\n pexprs.end.substituteParams =\n pexprs.Terminal.prototype.substituteParams =\n pexprs.Range.prototype.substituteParams =\n pexprs.UnicodeChar.prototype.substituteParams =\n function(actuals) {\n return this;\n };\n\npexprs.Param.prototype.substituteParams = function(actuals) {\n return actuals[this.index];\n};\n\npexprs.Alt.prototype.substituteParams = function(actuals) {\n return new pexprs.Alt(this.terms.map(term => term.substituteParams(actuals)));\n};\n\npexprs.Seq.prototype.substituteParams = function(actuals) {\n return new pexprs.Seq(this.factors.map(factor => factor.substituteParams(actuals)));\n};\n\npexprs.Iter.prototype.substituteParams =\n pexprs.Not.prototype.substituteParams =\n pexprs.Lookahead.prototype.substituteParams =\n pexprs.Lex.prototype.substituteParams =\n function(actuals) {\n return new this.constructor(this.expr.substituteParams(actuals));\n };\n\npexprs.Apply.prototype.substituteParams = function(actuals) {\n if (this.args.length === 0) {\n // Avoid making a copy of this application, as an optimization\n return this;\n } else {\n const args = this.args.map(arg => arg.substituteParams(actuals));\n return new pexprs.Apply(this.ruleName, args);\n }\n};\n","'use strict';\n\n// --------------------------------------------------------------------\n// Imports\n// --------------------------------------------------------------------\n\nconst common = require('./common');\nconst pexprs = require('./pexprs');\n\nconst {copyWithoutDuplicates} = common;\n\n// --------------------------------------------------------------------\n// Private stuff\n// --------------------------------------------------------------------\n\nfunction isRestrictedJSIdentifier(str) {\n return /^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(str);\n}\n\nfunction resolveDuplicatedNames(argumentNameList) {\n // `count` is used to record the number of times each argument name occurs in the list,\n // this is useful for checking duplicated argument name. It maps argument names to ints.\n const count = Object.create(null);\n argumentNameList.forEach(argName => {\n count[argName] = (count[argName] || 0) + 1;\n });\n\n // Append subscripts ('_1', '_2', ...) to duplicate argument names.\n Object.keys(count).forEach(dupArgName => {\n if (count[dupArgName] <= 1) {\n return;\n }\n\n // This name shows up more than once, so add subscripts.\n let subscript = 1;\n argumentNameList.forEach((argName, idx) => {\n if (argName === dupArgName) {\n argumentNameList[idx] = argName + '_' + subscript++;\n }\n });\n });\n}\n\n// --------------------------------------------------------------------\n// Operations\n// --------------------------------------------------------------------\n\n/*\n Returns a list of strings that will be used as the default argument names for its receiver\n (a pexpr) in a semantic action. This is used exclusively by the Semantics Editor.\n\n `firstArgIndex` is the 1-based index of the first argument name that will be generated for this\n pexpr. It enables us to name arguments positionally, e.g., if the second argument is a\n non-alphanumeric terminal like \"+\", it will be named '$2'.\n\n `noDupCheck` is true if the caller of `toArgumentNameList` is not a top level caller. It enables\n us to avoid nested duplication subscripts appending, e.g., '_1_1', '_1_2', by only checking\n duplicates at the top level.\n\n Here is a more elaborate example that illustrates how this method works:\n `(a \"+\" b).toArgumentNameList(1)` evaluates to `['a', '$2', 'b']` with the following recursive\n calls:\n\n (a).toArgumentNameList(1) -> ['a'],\n (\"+\").toArgumentNameList(2) -> ['$2'],\n (b).toArgumentNameList(3) -> ['b']\n\n Notes:\n * This method must only be called on well-formed expressions, e.g., the receiver must\n not have any Alt sub-expressions with inconsistent arities.\n * e.getArity() === e.toArgumentNameList(1).length\n*/\n// function(firstArgIndex, noDupCheck) { ... }\npexprs.PExpr.prototype.toArgumentNameList = common.abstract('toArgumentNameList');\n\npexprs.any.toArgumentNameList = function(firstArgIndex, noDupCheck) {\n return ['any'];\n};\n\npexprs.end.toArgumentNameList = function(firstArgIndex, noDupCheck) {\n return ['end'];\n};\n\npexprs.Terminal.prototype.toArgumentNameList = function(firstArgIndex, noDupCheck) {\n if (typeof this.obj === 'string' && /^[_a-zA-Z0-9]+$/.test(this.obj)) {\n // If this terminal is a valid suffix for a JS identifier, just prepend it with '_'\n return ['_' + this.obj];\n } else {\n // Otherwise, name it positionally.\n return ['$' + firstArgIndex];\n }\n};\n\npexprs.Range.prototype.toArgumentNameList = function(firstArgIndex, noDupCheck) {\n let argName = this.from + '_to_' + this.to;\n // If the `argName` is not valid then try to prepend a `_`.\n if (!isRestrictedJSIdentifier(argName)) {\n argName = '_' + argName;\n }\n // If the `argName` still not valid after prepending a `_`, then name it positionally.\n if (!isRestrictedJSIdentifier(argName)) {\n argName = '$' + firstArgIndex;\n }\n return [argName];\n};\n\npexprs.Alt.prototype.toArgumentNameList = function(firstArgIndex, noDupCheck) {\n // `termArgNameLists` is an array of arrays where each row is the\n // argument name list that corresponds to a term in this alternation.\n const termArgNameLists = this.terms.map(term =>\n term.toArgumentNameList(firstArgIndex, true)\n );\n\n const argumentNameList = [];\n const numArgs = termArgNameLists[0].length;\n for (let colIdx = 0; colIdx < numArgs; colIdx++) {\n const col = [];\n for (let rowIdx = 0; rowIdx < this.terms.length; rowIdx++) {\n col.push(termArgNameLists[rowIdx][colIdx]);\n }\n const uniqueNames = copyWithoutDuplicates(col);\n argumentNameList.push(uniqueNames.join('_or_'));\n }\n\n if (!noDupCheck) {\n resolveDuplicatedNames(argumentNameList);\n }\n return argumentNameList;\n};\n\npexprs.Seq.prototype.toArgumentNameList = function(firstArgIndex, noDupCheck) {\n // Generate the argument name list, without worrying about duplicates.\n let argumentNameList = [];\n this.factors.forEach(factor => {\n const factorArgumentNameList = factor.toArgumentNameList(firstArgIndex, true);\n argumentNameList = argumentNameList.concat(factorArgumentNameList);\n\n // Shift the firstArgIndex to take this factor's argument names into account.\n firstArgIndex += factorArgumentNameList.length;\n });\n if (!noDupCheck) {\n resolveDuplicatedNames(argumentNameList);\n }\n return argumentNameList;\n};\n\npexprs.Iter.prototype.toArgumentNameList = function(firstArgIndex, noDupCheck) {\n const argumentNameList = this.expr\n .toArgumentNameList(firstArgIndex, noDupCheck)\n .map(exprArgumentString =>\n exprArgumentString[exprArgumentString.length - 1] === 's' ?\n exprArgumentString + 'es' :\n exprArgumentString + 's'\n );\n if (!noDupCheck) {\n resolveDuplicatedNames(argumentNameList);\n }\n return argumentNameList;\n};\n\npexprs.Opt.prototype.toArgumentNameList = function(firstArgIndex, noDupCheck) {\n return this.expr.toArgumentNameList(firstArgIndex, noDupCheck).map(argName => {\n return 'opt' + argName[0].toUpperCase() + argName.slice(1);\n });\n};\n\npexprs.Not.prototype.toArgumentNameList = function(firstArgIndex, noDupCheck) {\n return [];\n};\n\npexprs.Lookahead.prototype.toArgumentNameList = pexprs.Lex.prototype.toArgumentNameList =\n function(firstArgIndex, noDupCheck) {\n return this.expr.toArgumentNameList(firstArgIndex, noDupCheck);\n };\n\npexprs.Apply.prototype.toArgumentNameList = function(firstArgIndex, noDupCheck) {\n return [this.ruleName];\n};\n\npexprs.UnicodeChar.prototype.toArgumentNameList = function(firstArgIndex, noDupCheck) {\n return ['$' + firstArgIndex];\n};\n\npexprs.Param.prototype.toArgumentNameList = function(firstArgIndex, noDupCheck) {\n return ['param' + this.index];\n};\n\n// \"Value pexprs\" (Value, Str, Arr, Obj) are going away soon, so we don't worry about them here.\n","'use strict';\n\n// --------------------------------------------------------------------\n// Imports\n// --------------------------------------------------------------------\n\nconst common = require('./common');\nconst pexprs = require('./pexprs');\n\n// --------------------------------------------------------------------\n// Operations\n// --------------------------------------------------------------------\n\n// Returns a string representing the PExpr, for use as a UI label, etc.\npexprs.PExpr.prototype.toDisplayString = common.abstract('toDisplayString');\n\npexprs.Alt.prototype.toDisplayString = pexprs.Seq.prototype.toDisplayString = function() {\n if (this.source) {\n return this.source.trimmed().contents;\n }\n return '[' + this.constructor.name + ']';\n};\n\npexprs.any.toDisplayString =\n pexprs.end.toDisplayString =\n pexprs.Iter.prototype.toDisplayString =\n pexprs.Not.prototype.toDisplayString =\n pexprs.Lookahead.prototype.toDisplayString =\n pexprs.Lex.prototype.toDisplayString =\n pexprs.Terminal.prototype.toDisplayString =\n pexprs.Range.prototype.toDisplayString =\n pexprs.Param.prototype.toDisplayString =\n function() {\n return this.toString();\n };\n\npexprs.Apply.prototype.toDisplayString = function() {\n if (this.args.length > 0) {\n const ps = this.args.map(arg => arg.toDisplayString());\n return this.ruleName + '<' + ps.join(',') + '>';\n } else {\n return this.ruleName;\n }\n};\n\npexprs.UnicodeChar.prototype.toDisplayString = function() {\n return 'Unicode [' + this.category + '] character';\n};\n","'use strict';\n\n// --------------------------------------------------------------------\n// Imports\n// --------------------------------------------------------------------\n\nconst Failure = require('./Failure');\nconst common = require('./common');\nconst pexprs = require('./pexprs');\n\n// --------------------------------------------------------------------\n// Operations\n// --------------------------------------------------------------------\n\npexprs.PExpr.prototype.toFailure = common.abstract('toFailure');\n\npexprs.any.toFailure = function(grammar) {\n return new Failure(this, 'any object', 'description');\n};\n\npexprs.end.toFailure = function(grammar) {\n return new Failure(this, 'end of input', 'description');\n};\n\npexprs.Terminal.prototype.toFailure = function(grammar) {\n return new Failure(this, this.obj, 'string');\n};\n\npexprs.Range.prototype.toFailure = function(grammar) {\n // TODO: come up with something better\n return new Failure(this, JSON.stringify(this.from) + '..' + JSON.stringify(this.to), 'code');\n};\n\npexprs.Not.prototype.toFailure = function(grammar) {\n const description =\n this.expr === pexprs.any ? 'nothing' : 'not ' + this.expr.toFailure(grammar);\n return new Failure(this, description, 'description');\n};\n\npexprs.Lookahead.prototype.toFailure = function(grammar) {\n return this.expr.toFailure(grammar);\n};\n\npexprs.Apply.prototype.toFailure = function(grammar) {\n let {description} = grammar.rules[this.ruleName];\n if (!description) {\n const article = /^[aeiouAEIOU]/.test(this.ruleName) ? 'an' : 'a';\n description = article + ' ' + this.ruleName;\n }\n return new Failure(this, description, 'description');\n};\n\npexprs.UnicodeChar.prototype.toFailure = function(grammar) {\n return new Failure(this, 'a Unicode [' + this.category + '] character', 'description');\n};\n\npexprs.Alt.prototype.toFailure = function(grammar) {\n const fs = this.terms.map(t => t.toFailure(grammar));\n const description = '(' + fs.join(' or ') + ')';\n return new Failure(this, description, 'description');\n};\n\npexprs.Seq.prototype.toFailure = function(grammar) {\n const fs = this.factors.map(f => f.toFailure(grammar));\n const description = '(' + fs.join(' ') + ')';\n return new Failure(this, description, 'description');\n};\n\npexprs.Iter.prototype.toFailure = function(grammar) {\n const description = '(' + this.expr.toFailure(grammar) + this.operator + ')';\n return new Failure(this, description, 'description');\n};\n","'use strict';\n\n// --------------------------------------------------------------------\n// Imports\n// --------------------------------------------------------------------\n\nconst common = require('./common');\nconst pexprs = require('./pexprs');\n\n// --------------------------------------------------------------------\n// Operations\n// --------------------------------------------------------------------\n\n/*\n e1.toString() === e2.toString() ==> e1 and e2 are semantically equivalent.\n Note that this is not an iff (<==>): e.g.,\n (~\"b\" \"a\").toString() !== (\"a\").toString(), even though\n ~\"b\" \"a\" and \"a\" are interchangeable in any grammar,\n both in terms of the languages they accept and their arities.\n*/\npexprs.PExpr.prototype.toString = common.abstract('toString');\n\npexprs.any.toString = function() {\n return 'any';\n};\n\npexprs.end.toString = function() {\n return 'end';\n};\n\npexprs.Terminal.prototype.toString = function() {\n return JSON.stringify(this.obj);\n};\n\npexprs.Range.prototype.toString = function() {\n return JSON.stringify(this.from) + '..' + JSON.stringify(this.to);\n};\n\npexprs.Param.prototype.toString = function() {\n return '$' + this.index;\n};\n\npexprs.Lex.prototype.toString = function() {\n return '#(' + this.expr.toString() + ')';\n};\n\npexprs.Alt.prototype.toString = function() {\n return this.terms.length === 1 ?\n this.terms[0].toString() :\n '(' + this.terms.map(term => term.toString()).join(' | ') + ')';\n};\n\npexprs.Seq.prototype.toString = function() {\n return this.factors.length === 1 ?\n this.factors[0].toString() :\n '(' + this.factors.map(factor => factor.toString()).join(' ') + ')';\n};\n\npexprs.Iter.prototype.toString = function() {\n return this.expr + this.operator;\n};\n\npexprs.Not.prototype.toString = function() {\n return '~' + this.expr;\n};\n\npexprs.Lookahead.prototype.toString = function() {\n return '&' + this.expr;\n};\n\npexprs.Apply.prototype.toString = function() {\n if (this.args.length > 0) {\n const ps = this.args.map(arg => arg.toString());\n return this.ruleName + '<' + ps.join(',') + '>';\n } else {\n return this.ruleName;\n }\n};\n\npexprs.UnicodeChar.prototype.toString = function() {\n return '\\\\p{' + this.category + '}';\n};\n","'use strict';\n\n// --------------------------------------------------------------------\n// Imports\n// --------------------------------------------------------------------\n\nconst Interval = require('./Interval');\n\n// --------------------------------------------------------------------\n// Private stuff\n// --------------------------------------------------------------------\n\nfunction InputStream(source) {\n this.source = source;\n this.pos = 0;\n this.examinedLength = 0;\n}\n\nInputStream.prototype = {\n atEnd() {\n const ans = this.pos === this.source.length;\n this.examinedLength = Math.max(this.examinedLength, this.pos + 1);\n return ans;\n },\n\n next() {\n const ans = this.source[this.pos++];\n this.examinedLength = Math.max(this.examinedLength, this.pos);\n return ans;\n },\n\n matchString(s, optIgnoreCase) {\n let idx;\n if (optIgnoreCase) {\n /*\n Case-insensitive comparison is a tricky business. Some notable gotchas include the\n \"Turkish I\" problem (http://www.i18nguy.com/unicode/turkish-i18n.html) and the fact\n that the German Esszet (ß) turns into \"SS\" in upper case.\n\n This is intended to be a locale-invariant comparison, which means it may not obey\n locale-specific expectations (e.g. \"i\" => \"İ\").\n */\n for (idx = 0; idx < s.length; idx++) {\n const actual = this.next();\n const expected = s[idx];\n if (actual == null || actual.toUpperCase() !== expected.toUpperCase()) {\n return false;\n }\n }\n return true;\n }\n // Default is case-sensitive comparison.\n for (idx = 0; idx < s.length; idx++) {\n if (this.next() !== s[idx]) {\n return false;\n }\n }\n return true;\n },\n\n sourceSlice(startIdx, endIdx) {\n return this.source.slice(startIdx, endIdx);\n },\n\n interval(startIdx, optEndIdx) {\n return new Interval(this.source, startIdx, optEndIdx ? optEndIdx : this.pos);\n },\n};\n\n// --------------------------------------------------------------------\n// Exports\n// --------------------------------------------------------------------\n\nmodule.exports = InputStream;\n","'use strict';\n\n// --------------------------------------------------------------------\n// Imports\n// --------------------------------------------------------------------\n\nconst common = require('./common');\nconst util = require('./util');\nconst Interval = require('./Interval');\n\n// --------------------------------------------------------------------\n// Private stuff\n// --------------------------------------------------------------------\n\nfunction MatchResult(\n matcher,\n input,\n startExpr,\n cst,\n cstOffset,\n rightmostFailurePosition,\n optRecordedFailures\n) {\n this.matcher = matcher;\n this.input = input;\n this.startExpr = startExpr;\n this._cst = cst;\n this._cstOffset = cstOffset;\n this._rightmostFailurePosition = rightmostFailurePosition;\n this._rightmostFailures = optRecordedFailures;\n\n if (this.failed()) {\n /* eslint-disable no-invalid-this */\n common.defineLazyProperty(this, 'message', function() {\n const detail = 'Expected ' + this.getExpectedText();\n return (\n util.getLineAndColumnMessage(this.input, this.getRightmostFailurePosition()) + detail\n );\n });\n common.defineLazyProperty(this, 'shortMessage', function() {\n const detail = 'expected ' + this.getExpectedText();\n const errorInfo = util.getLineAndColumn(this.input, this.getRightmostFailurePosition());\n return 'Line ' + errorInfo.lineNum + ', col ' + errorInfo.colNum + ': ' + detail;\n });\n /* eslint-enable no-invalid-this */\n }\n}\n\nMatchResult.prototype.succeeded = function() {\n return !!this._cst;\n};\n\nMatchResult.prototype.failed = function() {\n return !this.succeeded();\n};\n\nMatchResult.prototype.getRightmostFailurePosition = function() {\n return this._rightmostFailurePosition;\n};\n\nMatchResult.prototype.getRightmostFailures = function() {\n if (!this._rightmostFailures) {\n this.matcher.setInput(this.input);\n const matchResultWithFailures = this.matcher._match(\n this.startExpr,\n false,\n this.getRightmostFailurePosition()\n );\n this._rightmostFailures = matchResultWithFailures.getRightmostFailures();\n }\n return this._rightmostFailures;\n};\n\nMatchResult.prototype.toString = function() {\n return this.succeeded() ?\n '[match succeeded]' :\n '[match failed at position ' + this.getRightmostFailurePosition() + ']';\n};\n\n// Return a string summarizing the expected contents of the input stream when\n// the match failure occurred.\nMatchResult.prototype.getExpectedText = function() {\n if (this.succeeded()) {\n throw new Error('cannot get expected text of a successful MatchResult');\n }\n\n const sb = new common.StringBuffer();\n let failures = this.getRightmostFailures();\n\n // Filter out the fluffy failures to make the default error messages more useful\n failures = failures.filter(failure => !failure.isFluffy());\n\n for (let idx = 0; idx < failures.length; idx++) {\n if (idx > 0) {\n if (idx === failures.length - 1) {\n sb.append(failures.length > 2 ? ', or ' : ' or ');\n } else {\n sb.append(', ');\n }\n }\n sb.append(failures[idx].toString());\n }\n return sb.contents();\n};\n\nMatchResult.prototype.getInterval = function() {\n const pos = this.getRightmostFailurePosition();\n return new Interval(this.input, pos, pos);\n};\n\n// --------------------------------------------------------------------\n// Exports\n// --------------------------------------------------------------------\n\nmodule.exports = MatchResult;\n","'use strict';\n\n// --------------------------------------------------------------------\n// Private stuff\n// --------------------------------------------------------------------\n\nfunction PosInfo() {\n this.applicationMemoKeyStack = []; // active applications at this position\n this.memo = {};\n this.maxExaminedLength = 0;\n this.maxRightmostFailureOffset = -1;\n this.currentLeftRecursion = undefined;\n}\n\nPosInfo.prototype = {\n isActive(application) {\n return this.applicationMemoKeyStack.indexOf(application.toMemoKey()) >= 0;\n },\n\n enter(application) {\n this.applicationMemoKeyStack.push(application.toMemoKey());\n },\n\n exit() {\n this.applicationMemoKeyStack.pop();\n },\n\n startLeftRecursion(headApplication, memoRec) {\n memoRec.isLeftRecursion = true;\n memoRec.headApplication = headApplication;\n memoRec.nextLeftRecursion = this.currentLeftRecursion;\n this.currentLeftRecursion = memoRec;\n\n const {applicationMemoKeyStack} = this;\n const indexOfFirstInvolvedRule =\n applicationMemoKeyStack.indexOf(headApplication.toMemoKey()) + 1;\n const involvedApplicationMemoKeys = applicationMemoKeyStack.slice(\n indexOfFirstInvolvedRule\n );\n\n memoRec.isInvolved = function(applicationMemoKey) {\n return involvedApplicationMemoKeys.indexOf(applicationMemoKey) >= 0;\n };\n\n memoRec.updateInvolvedApplicationMemoKeys = function() {\n for (let idx = indexOfFirstInvolvedRule; idx < applicationMemoKeyStack.length; idx++) {\n const applicationMemoKey = applicationMemoKeyStack[idx];\n if (!this.isInvolved(applicationMemoKey)) {\n involvedApplicationMemoKeys.push(applicationMemoKey);\n }\n }\n };\n },\n\n endLeftRecursion() {\n this.currentLeftRecursion = this.currentLeftRecursion.nextLeftRecursion;\n },\n\n // Note: this method doesn't get called for the \"head\" of a left recursion -- for LR heads,\n // the memoized result (which starts out being a failure) is always used.\n shouldUseMemoizedResult(memoRec) {\n if (!memoRec.isLeftRecursion) {\n return true;\n }\n const {applicationMemoKeyStack} = this;\n for (let idx = 0; idx < applicationMemoKeyStack.length; idx++) {\n const applicationMemoKey = applicationMemoKeyStack[idx];\n if (memoRec.isInvolved(applicationMemoKey)) {\n return false;\n }\n }\n return true;\n },\n\n memoize(memoKey, memoRec) {\n this.memo[memoKey] = memoRec;\n this.maxExaminedLength = Math.max(this.maxExaminedLength, memoRec.examinedLength);\n this.maxRightmostFailureOffset = Math.max(\n this.maxRightmostFailureOffset,\n memoRec.rightmostFailureOffset\n );\n return memoRec;\n },\n\n clearObsoleteEntries(pos, invalidatedIdx) {\n if (pos + this.maxExaminedLength <= invalidatedIdx) {\n // Optimization: none of the rule applications that were memoized here examined the\n // interval of the input that changed, so nothing has to be invalidated.\n return;\n }\n\n const {memo} = this;\n this.maxExaminedLength = 0;\n this.maxRightmostFailureOffset = -1;\n Object.keys(memo).forEach(k => {\n const memoRec = memo[k];\n if (pos + memoRec.examinedLength > invalidatedIdx) {\n delete memo[k];\n } else {\n this.maxExaminedLength = Math.max(this.maxExaminedLength, memoRec.examinedLength);\n this.maxRightmostFailureOffset = Math.max(\n this.maxRightmostFailureOffset,\n memoRec.rightmostFailureOffset\n );\n }\n });\n },\n};\n\n// --------------------------------------------------------------------\n// Exports\n// --------------------------------------------------------------------\n\nmodule.exports = PosInfo;\n","'use strict';\n\n// --------------------------------------------------------------------\n// Imports\n// --------------------------------------------------------------------\n\nconst InputStream = require('./InputStream');\nconst MatchResult = require('./MatchResult');\nconst PosInfo = require('./PosInfo');\nconst Trace = require('./Trace');\nconst pexprs = require('./pexprs');\nconst util = require('./util');\n\n// --------------------------------------------------------------------\n// Private stuff\n// --------------------------------------------------------------------\n\nlet builtInApplySyntacticBody;\n\nutil.awaitBuiltInRules(builtInRules => {\n builtInApplySyntacticBody = builtInRules.rules.experimentalApplySyntactic.body;\n});\n\nconst applySpaces = new pexprs.Apply('spaces');\n\nfunction MatchState(matcher, startExpr, optPositionToRecordFailures) {\n this.matcher = matcher;\n this.startExpr = startExpr;\n\n this.grammar = matcher.grammar;\n this.input = matcher.input;\n this.inputStream = new InputStream(matcher.input);\n this.memoTable = matcher.memoTable;\n\n this._bindings = [];\n this._bindingOffsets = [];\n this._applicationStack = [];\n this._posStack = [0];\n this.inLexifiedContextStack = [false];\n\n this.rightmostFailurePosition = -1;\n this._rightmostFailurePositionStack = [];\n this._recordedFailuresStack = [];\n\n if (optPositionToRecordFailures !== undefined) {\n this.positionToRecordFailures = optPositionToRecordFailures;\n this.recordedFailures = Object.create(null);\n }\n}\n\nMatchState.prototype = {\n posToOffset(pos) {\n return pos - this._posStack[this._posStack.length - 1];\n },\n\n enterApplication(posInfo, app) {\n this._posStack.push(this.inputStream.pos);\n this._applicationStack.push(app);\n this.inLexifiedContextStack.push(false);\n posInfo.enter(app);\n this._rightmostFailurePositionStack.push(this.rightmostFailurePosition);\n this.rightmostFailurePosition = -1;\n },\n\n exitApplication(posInfo, optNode) {\n const origPos = this._posStack.pop();\n this._applicationStack.pop();\n this.inLexifiedContextStack.pop();\n posInfo.exit();\n\n this.rightmostFailurePosition = Math.max(\n this.rightmostFailurePosition,\n this._rightmostFailurePositionStack.pop()\n );\n\n if (optNode) {\n this.pushBinding(optNode, origPos);\n }\n },\n\n enterLexifiedContext() {\n this.inLexifiedContextStack.push(true);\n },\n\n exitLexifiedContext() {\n this.inLexifiedContextStack.pop();\n },\n\n currentApplication() {\n return this._applicationStack[this._applicationStack.length - 1];\n },\n\n inSyntacticContext() {\n const currentApplication = this.currentApplication();\n if (currentApplication) {\n return currentApplication.isSyntactic() && !this.inLexifiedContext();\n } else {\n // The top-level context is syntactic if the start application is.\n return this.startExpr.factors[0].isSyntactic();\n }\n },\n\n inLexifiedContext() {\n return this.inLexifiedContextStack[this.inLexifiedContextStack.length - 1];\n },\n\n skipSpaces() {\n this.pushFailuresInfo();\n this.eval(applySpaces);\n this.popBinding();\n this.popFailuresInfo();\n return this.inputStream.pos;\n },\n\n skipSpacesIfInSyntacticContext() {\n return this.inSyntacticContext() ? this.skipSpaces() : this.inputStream.pos;\n },\n\n maybeSkipSpacesBefore(expr) {\n if (expr instanceof pexprs.Apply && expr.isSyntactic()) {\n return this.skipSpaces();\n } else if (expr.allowsSkippingPrecedingSpace() && expr !== applySpaces) {\n return this.skipSpacesIfInSyntacticContext();\n } else {\n return this.inputStream.pos;\n }\n },\n\n pushBinding(node, origPos) {\n this._bindings.push(node);\n this._bindingOffsets.push(this.posToOffset(origPos));\n },\n\n popBinding() {\n this._bindings.pop();\n this._bindingOffsets.pop();\n },\n\n numBindings() {\n return this._bindings.length;\n },\n\n truncateBindings(newLength) {\n // Yes, this is this really faster than setting the `length` property (tested with\n // bin/es5bench on Node v6.1.0).\n // Update 2021-10-25: still true on v14.15.5 — it's ~20% speedup on es5bench.\n while (this._bindings.length > newLength) {\n this.popBinding();\n }\n },\n\n getCurrentPosInfo() {\n return this.getPosInfo(this.inputStream.pos);\n },\n\n getPosInfo(pos) {\n let posInfo = this.memoTable[pos];\n if (!posInfo) {\n posInfo = this.memoTable[pos] = new PosInfo();\n }\n return posInfo;\n },\n\n processFailure(pos, expr) {\n this.rightmostFailurePosition = Math.max(this.rightmostFailurePosition, pos);\n\n if (this.recordedFailures && pos === this.positionToRecordFailures) {\n const app = this.currentApplication();\n if (app) {\n // Substitute parameters with the actual pexprs that were passed to\n // the current rule.\n expr = expr.substituteParams(app.args);\n } else {\n // This branch is only reached for the \"end-check\" that is\n // performed after the top-level application. In that case,\n // expr === pexprs.end so there is no need to substitute\n // parameters.\n }\n\n this.recordFailure(expr.toFailure(this.grammar), false);\n }\n },\n\n recordFailure(failure, shouldCloneIfNew) {\n const key = failure.toKey();\n if (!this.recordedFailures[key]) {\n this.recordedFailures[key] = shouldCloneIfNew ? failure.clone() : failure;\n } else if (this.recordedFailures[key].isFluffy() && !failure.isFluffy()) {\n this.recordedFailures[key].clearFluffy();\n }\n },\n\n recordFailures(failures, shouldCloneIfNew) {\n Object.keys(failures).forEach(key => {\n this.recordFailure(failures[key], shouldCloneIfNew);\n });\n },\n\n cloneRecordedFailures() {\n if (!this.recordedFailures) {\n return undefined;\n }\n\n const ans = Object.create(null);\n Object.keys(this.recordedFailures).forEach(key => {\n ans[key] = this.recordedFailures[key].clone();\n });\n return ans;\n },\n\n getRightmostFailurePosition() {\n return this.rightmostFailurePosition;\n },\n\n _getRightmostFailureOffset() {\n return this.rightmostFailurePosition >= 0 ?\n this.posToOffset(this.rightmostFailurePosition) :\n -1;\n },\n\n // Returns the memoized trace entry for `expr` at `pos`, if one exists, `null` otherwise.\n getMemoizedTraceEntry(pos, expr) {\n const posInfo = this.memoTable[pos];\n if (posInfo && expr.ruleName) {\n const memoRec = posInfo.memo[expr.toMemoKey()];\n if (memoRec && memoRec.traceEntry) {\n const entry = memoRec.traceEntry.cloneWithExpr(expr);\n entry.isMemoized = true;\n return entry;\n }\n }\n return null;\n },\n\n // Returns a new trace entry, with the currently active trace array as its children.\n getTraceEntry(pos, expr, succeeded, bindings) {\n if (expr instanceof pexprs.Apply) {\n const app = this.currentApplication();\n const actuals = app ? app.args : [];\n expr = expr.substituteParams(actuals);\n }\n return (\n this.getMemoizedTraceEntry(pos, expr) ||\n new Trace(this.input, pos, this.inputStream.pos, expr, succeeded, bindings, this.trace)\n );\n },\n\n isTracing() {\n return !!this.trace;\n },\n\n hasNecessaryInfo(memoRec) {\n if (this.trace && !memoRec.traceEntry) {\n return false;\n }\n\n if (\n this.recordedFailures &&\n this.inputStream.pos + memoRec.rightmostFailureOffset === this.positionToRecordFailures\n ) {\n return !!memoRec.failuresAtRightmostPosition;\n }\n\n return true;\n },\n\n useMemoizedResult(origPos, memoRec) {\n if (this.trace) {\n this.trace.push(memoRec.traceEntry);\n }\n\n const memoRecRightmostFailurePosition =\n this.inputStream.pos + memoRec.rightmostFailureOffset;\n this.rightmostFailurePosition = Math.max(\n this.rightmostFailurePosition,\n memoRecRightmostFailurePosition\n );\n if (\n this.recordedFailures &&\n this.positionToRecordFailures === memoRecRightmostFailurePosition &&\n memoRec.failuresAtRightmostPosition\n ) {\n this.recordFailures(memoRec.failuresAtRightmostPosition, true);\n }\n\n this.inputStream.examinedLength = Math.max(\n this.inputStream.examinedLength,\n memoRec.examinedLength + origPos\n );\n\n if (memoRec.value) {\n this.inputStream.pos += memoRec.matchLength;\n this.pushBinding(memoRec.value, origPos);\n return true;\n }\n return false;\n },\n\n // Evaluate `expr` and return `true` if it succeeded, `false` otherwise. On success, `bindings`\n // will have `expr.getArity()` more elements than before, and the input stream's position may\n // have increased. On failure, `bindings` and position will be unchanged.\n eval(expr) {\n const {inputStream} = this;\n const origNumBindings = this._bindings.length;\n\n let origRecordedFailures;\n if (this.recordedFailures) {\n origRecordedFailures = this.recordedFailures;\n this.recordedFailures = Object.create(null);\n }\n\n const origPos = inputStream.pos;\n const memoPos = this.maybeSkipSpacesBefore(expr);\n\n let origTrace;\n if (this.trace) {\n origTrace = this.trace;\n this.trace = [];\n }\n\n // Do the actual evaluation.\n const ans = expr.eval(this);\n\n if (this.trace) {\n const bindings = this._bindings.slice(origNumBindings);\n const traceEntry = this.getTraceEntry(memoPos, expr, ans, bindings);\n traceEntry.isImplicitSpaces = expr === applySpaces;\n traceEntry.isRootNode = expr === this.startExpr;\n origTrace.push(traceEntry);\n this.trace = origTrace;\n }\n\n if (ans) {\n if (this.recordedFailures && inputStream.pos === this.positionToRecordFailures) {\n Object.keys(this.recordedFailures).forEach(key => {\n this.recordedFailures[key].makeFluffy();\n });\n }\n } else {\n // Reset the position and the bindings.\n inputStream.pos = origPos;\n this.truncateBindings(origNumBindings);\n }\n\n if (this.recordedFailures) {\n this.recordFailures(origRecordedFailures, false);\n }\n\n // The built-in experimentalApplySyntactic rule needs special handling: we want to skip\n // trailing spaces, just as with the top-level application of a syntactic rule.\n if (expr === builtInApplySyntacticBody) {\n this.skipSpaces();\n }\n\n return ans;\n },\n\n getMatchResult() {\n this.eval(this.startExpr);\n let rightmostFailures;\n if (this.recordedFailures) {\n rightmostFailures = Object.keys(this.recordedFailures).map(\n key => this.recordedFailures[key]\n );\n }\n return new MatchResult(\n this.matcher,\n this.input,\n this.startExpr,\n this._bindings[0],\n this._bindingOffsets[0],\n this.rightmostFailurePosition,\n rightmostFailures\n );\n },\n\n getTrace() {\n this.trace = [];\n const matchResult = this.getMatchResult();\n\n // The trace node for the start rule is always the last entry. If it is a syntactic rule,\n // the first entry is for an application of 'spaces'.\n // TODO(pdubroy): Clean this up by introducing a special `Match<startAppl>` rule, which will\n // ensure that there is always a single root trace node.\n const rootTrace = this.trace[this.trace.length - 1];\n rootTrace.result = matchResult;\n return rootTrace;\n },\n\n pushFailuresInfo() {\n this._rightmostFailurePositionStack.push(this.rightmostFailurePosition);\n this._recordedFailuresStack.push(this.recordedFailures);\n },\n\n popFailuresInfo() {\n this.rightmostFailurePosition = this._rightmostFailurePositionStack.pop();\n this.recordedFailures = this._recordedFailuresStack.pop();\n },\n};\n\n// --------------------------------------------------------------------\n// Exports\n// --------------------------------------------------------------------\n\nmodule.exports = MatchState;\n","'use strict';\n\n// --------------------------------------------------------------------\n// Imports\n// --------------------------------------------------------------------\n\nconst MatchState = require('./MatchState');\n\nconst pexprs = require('./pexprs');\n\n// --------------------------------------------------------------------\n// Private stuff\n// --------------------------------------------------------------------\n\nfunction Matcher(grammar) {\n this.grammar = grammar;\n this.memoTable = [];\n this.input = '';\n}\n\nMatcher.prototype.getInput = function() {\n return this.input;\n};\n\nMatcher.prototype.setInput = function(str) {\n if (this.input !== str) {\n this.replaceInputRange(0, this.input.length, str);\n }\n return this;\n};\n\nMatcher.prototype.replaceInputRange = function(startIdx, endIdx, str) {\n const currentInput = this.input;\n if (\n startIdx < 0 ||\n startIdx > currentInput.length ||\n endIdx < 0 ||\n endIdx > currentInput.length ||\n startIdx > endIdx\n ) {\n throw new Error('Invalid indices: ' + startIdx + ' and ' + endIdx);\n }\n\n // update input\n this.input = currentInput.slice(0, startIdx) + str + currentInput.slice(endIdx);\n\n // update memo table (similar to the above)\n const restOfMemoTable = this.memoTable.slice(endIdx);\n this.memoTable.length = startIdx;\n for (let idx = 0; idx < str.length; idx++) {\n this.memoTable.push(undefined);\n }\n restOfMemoTable.forEach(function(posInfo) {\n this.memoTable.push(posInfo);\n }, this);\n\n // Invalidate memoRecs\n for (let pos = 0; pos < startIdx; pos++) {\n const posInfo = this.memoTable[pos];\n if (posInfo) {\n posInfo.clearObsoleteEntries(pos, startIdx);\n }\n }\n\n return this;\n};\n\nMatcher.prototype.match = function(optStartApplicationStr) {\n return this._match(this._getStartExpr(optStartApplicationStr), false);\n};\n\nMatcher.prototype.trace = function(optStartApplicationStr) {\n return this._match(this._getStartExpr(optStartApplicationStr), true);\n};\n\nMatcher.prototype._match = function(startExpr, tracing, optPositionToRecordFailures) {\n const state = new MatchState(this, startExpr, optPositionToRecordFailures);\n return tracing ? state.getTrace() : state.getMatchResult();\n};\n\n/*\n Returns the starting expression for this Matcher's associated grammar. If `optStartApplicationStr`\n is specified, it is a string expressing a rule application in the grammar. If not specified, the\n grammar's default start rule will be used.\n*/\nMatcher.prototype._getStartExpr = function(optStartApplicationStr) {\n const applicationStr = optStartApplicationStr || this.grammar.defaultStartRule;\n if (!applicationStr) {\n throw new Error('Missing start rule argument -- the grammar has no default start rule.');\n }\n\n const startApp = this.grammar.parseApplication(applicationStr);\n return new pexprs.Seq([startApp, pexprs.end]);\n};\n\n// --------------------------------------------------------------------\n// Exports\n// --------------------------------------------------------------------\n\nmodule.exports = Matcher;\n","'use strict';\n\n// --------------------------------------------------------------------\n// Imports\n// --------------------------------------------------------------------\n\nconst InputStream = require('./InputStream');\nconst {IterationNode} = require('./nodes');\nconst MatchResult = require('./MatchResult');\nconst common = require('./common');\nconst errors = require('./errors');\nconst util = require('./util');\n\n// --------------------------------------------------------------------\n// Private stuff\n// --------------------------------------------------------------------\n\nconst globalActionStack = [];\nlet prototypeGrammar;\nlet prototypeGrammarSemantics;\n\nconst hasOwnProperty = (x, prop) => Object.prototype.hasOwnProperty.call(x, prop);\n\n// ----------------- Wrappers -----------------\n\n// Wrappers decorate CST nodes with all of the functionality (i.e., operations and attributes)\n// provided by a Semantics (see below). `Wrapper` is the abstract superclass of all wrappers. A\n// `Wrapper` must have `_node` and `_semantics` instance variables, which refer to the CST node and\n// Semantics (resp.) for which it was created, and a `_childWrappers` instance variable which is\n// used to cache the wrapper instances that are created for its child nodes. Setting these instance\n// variables is the responsibility of the constructor of each Semantics-specific subclass of\n// `Wrapper`.\nclass Wrapper {\n constructor(node, sourceInterval, baseInterval) {\n this._node = node;\n this.source = sourceInterval;\n\n // The interval that the childOffsets of `node` are relative to. It should be the source\n // of the closest Nonterminal node.\n this._baseInterval = baseInterval;\n\n if (node.isNonterminal()) {\n common.assert(sourceInterval === baseInterval);\n }\n this._childWrappers = [];\n }\n\n toString() {\n return '[semantics wrapper for ' + this._node.grammar.name + ']';\n }\n\n // This is used by ohm editor to display a node wrapper appropriately.\n toJSON() {\n return this.toString();\n }\n\n _forgetMemoizedResultFor(attributeName) {\n // Remove the memoized attribute from the cstNode and all its children.\n delete this._node[this._semantics.attributeKeys[attributeName]];\n this.children.forEach(child => {\n child._forgetMemoizedResultFor(attributeName);\n });\n }\n\n // Returns the wrapper of the specified child node. Child wrappers are created lazily and\n // cached in the parent wrapper's `_childWrappers` instance variable.\n child(idx) {\n if (!(0 <= idx && idx < this._node.numChildren())) {\n // TODO: Consider throwing an exception here.\n return undefined;\n }\n let childWrapper = this._childWrappers[idx];\n if (!childWrapper) {\n const childNode = this._node.childAt(idx);\n const offset = this._node.childOffsets[idx];\n\n const source = this._baseInterval.subInterval(offset, childNode.matchLength);\n const base = childNode.isNonterminal() ? source : this._baseInterval;\n childWrapper = this._childWrappers[idx] = this._semantics.wrap(childNode, source, base);\n }\n return childWrapper;\n }\n\n // Returns an array containing the wrappers of all of the children of the node associated\n // with this wrapper.\n _children() {\n // Force the creation of all child wrappers\n for (let idx = 0; idx < this._node.numChildren(); idx++) {\n this.child(idx);\n }\n return this._childWrappers;\n }\n\n // Returns `true` if the CST node associated with this wrapper corresponds to an iteration\n // expression, i.e., a Kleene-*, Kleene-+, or an optional. Returns `false` otherwise.\n isIteration() {\n return this._node.isIteration();\n }\n\n // Returns `true` if the CST node associated with this wrapper is a terminal node, `false`\n // otherwise.\n isTerminal() {\n return this._node.isTerminal();\n }\n\n // Returns `true` if the CST node associated with this wrapper is a nonterminal node, `false`\n // otherwise.\n isNonterminal() {\n return this._node.isNonterminal();\n }\n\n // Returns `true` if the CST node associated with this wrapper is a nonterminal node\n // corresponding to a syntactic rule, `false` otherwise.\n isSyntactic() {\n return this.isNonterminal() && this._node.isSyntactic();\n }\n\n // Returns `true` if the CST node associated with this wrapper is a nonterminal node\n // corresponding to a lexical rule, `false` otherwise.\n isLexical() {\n return this.isNonterminal() && this._node.isLexical();\n }\n\n // Returns `true` if the CST node associated with this wrapper is an iterator node\n // having either one or no child (? operator), `false` otherwise.\n // Otherwise, throws an exception.\n isOptional() {\n return this._node.isOptional();\n }\n\n // Create a new _iter wrapper in the same semantics as this wrapper.\n iteration(optChildWrappers) {\n const childWrappers = optChildWrappers || [];\n\n const childNodes = childWrappers.map(c => c._node);\n const iter = new IterationNode(this._node.grammar, childNodes, [], -1, false);\n\n const wrapper = this._semantics.wrap(iter, null, null);\n wrapper._childWrappers = childWrappers;\n return wrapper;\n }\n\n // Returns an array containing the children of this CST node.\n get children() {\n return this._children();\n }\n\n // Returns the name of grammar rule that created this CST node.\n get ctorName() {\n return this._node.ctorName;\n }\n\n // TODO: Remove this eventually (deprecated in v0.12).\n get interval() {\n throw new Error('The `interval` property is deprecated -- use `source` instead');\n }\n\n // Returns the number of children of this CST node.\n get numChildren() {\n return this._node.numChildren();\n }\n\n // Returns the primitive value of this CST node, if it's a terminal node. Otherwise,\n // throws an exception.\n // DEPRECATED: Use `sourceString` instead.\n get primitiveValue() {\n if (this.isTerminal()) {\n return this._node.primitiveValue;\n }\n throw new TypeError(\n \"tried to access the 'primitiveValue' attribute of a non-terminal CST node\"\n );\n }\n\n // Returns the contents of the input stream consumed by this CST node.\n get sourceString() {\n return this.source.contents;\n }\n}\n\n// ----------------- Semantics -----------------\n\n// A Semantics is a container for a family of Operations and Attributes for a given grammar.\n// Semantics enable modularity (different clients of a grammar can create their set of operations\n// and attributes in isolation) and extensibility even when operations and attributes are mutually-\n// recursive. This constructor should not be called directly except from\n// `Semantics.createSemantics`. The normal ways to create a Semantics, given a grammar 'g', are\n// `g.createSemantics()` and `g.extendSemantics(parentSemantics)`.\nfunction Semantics(grammar, superSemantics) {\n const self = this;\n this.grammar = grammar;\n this.checkedActionDicts = false;\n\n // Constructor for wrapper instances, which are passed as the arguments to the semantic actions\n // of an operation or attribute. Operations and attributes require double dispatch: the semantic\n // action is chosen based on both the node's type and the semantics. Wrappers ensure that\n // the `execute` method is called with the correct (most specific) semantics object as an\n // argument.\n this.Wrapper = class extends (superSemantics ? superSemantics.Wrapper : Wrapper) {\n constructor(node, sourceInterval, baseInterval) {\n super(node, sourceInterval, baseInterval);\n self.checkActionDictsIfHaventAlready();\n this._semantics = self;\n }\n };\n\n this.super = superSemantics;\n if (superSemantics) {\n if (!(grammar.equals(this.super.grammar) || grammar._inheritsFrom(this.super.grammar))) {\n throw new Error(\n \"Cannot extend a semantics for grammar '\" +\n this.super.grammar.name +\n \"' for use with grammar '\" +\n grammar.name +\n \"' (not a sub-grammar)\"\n );\n }\n this.operations = Object.create(this.super.operations);\n this.attributes = Object.create(this.super.attributes);\n this.attributeKeys = Object.create(null);\n\n // Assign unique symbols for each of the attributes inherited from the super-semantics so that\n // they are memoized independently.\n // eslint-disable-next-line guard-for-in\n for (const attributeName in this.attributes) {\n Object.defineProperty(this.attributeKeys, attributeName, {\n value: util.uniqueId(attributeName),\n });\n }\n } else {\n this.operations = Object.create(null);\n this.attributes = Object.create(null);\n this.attributeKeys = Object.create(null);\n }\n}\n\nSemantics.prototype.toString = function() {\n return '[semantics for ' + this.grammar.name + ']';\n};\n\nSemantics.prototype.checkActionDictsIfHaventAlready = function() {\n if (!this.checkedActionDicts) {\n this.checkActionDicts();\n this.checkedActionDicts = true;\n }\n};\n\n// Checks that the action dictionaries for all operations and attributes in this semantics,\n// including the ones that were inherited from the super-semantics, agree with the grammar.\n// Throws an exception if one or more of them doesn't.\nSemantics.prototype.checkActionDicts = function() {\n let name;\n // eslint-disable-next-line guard-for-in\n for (name in this.operations) {\n this.operations[name].checkActionDict(this.grammar);\n }\n // eslint-disable-next-line guard-for-in\n for (name in this.attributes) {\n this.attributes[name].checkActionDict(this.grammar);\n }\n};\n\nSemantics.prototype.toRecipe = function(semanticsOnly) {\n function hasSuperSemantics(s) {\n return s.super !== Semantics.BuiltInSemantics._getSemantics();\n }\n\n let str = '(function(g) {\\n';\n if (hasSuperSemantics(this)) {\n str += ' var semantics = ' + this.super.toRecipe(true) + '(g';\n\n const superSemanticsGrammar = this.super.grammar;\n let relatedGrammar = this.grammar;\n while (relatedGrammar !== superSemanticsGrammar) {\n str += '.superGrammar';\n relatedGrammar = relatedGrammar.superGrammar;\n }\n\n str += ');\\n';\n str += ' return g.extendSemantics(semantics)';\n } else {\n str += ' return g.createSemantics()';\n }\n ['Operation', 'Attribute'].forEach(type => {\n const semanticOperations = this[type.toLowerCase() + 's'];\n Object.keys(semanticOperations).forEach(name => {\n const {actionDict, formals, builtInDefault} = semanticOperations[name];\n\n let signature = name;\n if (formals.length > 0) {\n signature += '(' + formals.join(', ') + ')';\n }\n\n let method;\n if (hasSuperSemantics(this) && this.super[type.toLowerCase() + 's'][name]) {\n method = 'extend' + type;\n } else {\n method = 'add' + type;\n }\n str += '\\n .' + method + '(' + JSON.stringify(signature) + ', {';\n\n const srcArray = [];\n Object.keys(actionDict).forEach(actionName => {\n if (actionDict[actionName] !== builtInDefault) {\n let source = actionDict[actionName].toString().trim();\n\n // Convert method shorthand to plain old function syntax.\n // https://github.com/harc/ohm/issues/263\n source = source.replace(/^.*\\(/, 'function(');\n\n srcArray.push('\\n ' + JSON.stringify(actionName) + ': ' + source);\n }\n });\n str += srcArray.join(',') + '\\n })';\n });\n });\n str += ';\\n })';\n\n if (!semanticsOnly) {\n str =\n '(function() {\\n' +\n ' var grammar = this.fromRecipe(' +\n this.grammar.toRecipe() +\n ');\\n' +\n ' var semantics = ' +\n str +\n '(grammar);\\n' +\n ' return semantics;\\n' +\n '});\\n';\n }\n\n return str;\n};\n\nfunction parseSignature(signature, type) {\n if (!prototypeGrammar) {\n // The Operations and Attributes grammar won't be available while Ohm is loading,\n // but we can get away the following simplification b/c none of the operations\n // that are used while loading take arguments.\n common.assert(signature.indexOf('(') === -1);\n return {\n name: signature,\n formals: [],\n };\n }\n\n const r = prototypeGrammar.match(\n signature,\n type === 'operation' ? 'OperationSignature' : 'AttributeSignature'\n );\n if (r.failed()) {\n throw new Error(r.message);\n }\n\n return prototypeGrammarSemantics(r).parse();\n}\n\nfunction newDefaultAction(type, name, doIt) {\n return function(...children) {\n const thisThing = this._semantics.operations[name] || this._semantics.attributes[name];\n const args = thisThing.formals.map(formal => this.args[formal]);\n\n if (!this.isIteration() && children.length === 1) {\n // This CST node corresponds to a non-terminal in the grammar (e.g., AddExpr). The fact that\n // we got here means that this action dictionary doesn't have an action for this particular\n // non-terminal or a generic `_nonterminal` action.\n // As a convenience, if this node only has one child, we just return the result of applying\n // this operation / attribute to the child node.\n return doIt.apply(children[0], args);\n } else {\n // Otherwise, we throw an exception to let the programmer know that we don't know what\n // to do with this node.\n throw errors.missingSemanticAction(this.ctorName, name, type, globalActionStack);\n }\n };\n}\n\nSemantics.prototype.addOperationOrAttribute = function(type, signature, actionDict) {\n const typePlural = type + 's';\n\n const parsedNameAndFormalArgs = parseSignature(signature, type);\n const {name} = parsedNameAndFormalArgs;\n const {formals} = parsedNameAndFormalArgs;\n\n // TODO: check that there are no duplicate formal arguments\n\n this.assertNewName(name, type);\n\n // Create the action dictionary for this operation / attribute that contains a `_default` action\n // which defines the default behavior of iteration, terminal, and non-terminal nodes...\n const builtInDefault = newDefaultAction(type, name, doIt);\n const realActionDict = {_default: builtInDefault};\n // ... and add in the actions supplied by the programmer, which may override some or all of the\n // default ones.\n Object.keys(actionDict).forEach(name => {\n realActionDict[name] = actionDict[name];\n });\n\n const entry =\n type === 'operation' ?\n new Operation(name, formals, realActionDict, builtInDefault) :\n new Attribute(name, realActionDict, builtInDefault);\n\n // The following check is not strictly necessary (it will happen later anyway) but it's better to\n // catch errors early.\n entry.checkActionDict(this.grammar);\n\n this[typePlural][name] = entry;\n\n function doIt(...args) {\n // Dispatch to most specific version of this operation / attribute -- it may have been\n // overridden by a sub-semantics.\n const thisThing = this._semantics[typePlural][name];\n\n // Check that the caller passed the correct number of arguments.\n if (arguments.length !== thisThing.formals.length) {\n throw new Error(\n 'Invalid number of arguments passed to ' +\n name +\n ' ' +\n type +\n ' (expected ' +\n thisThing.formals.length +\n ', got ' +\n arguments.length +\n ')'\n );\n }\n\n // Create an \"arguments object\" from the arguments that were passed to this\n // operation / attribute.\n const argsObj = Object.create(null);\n for (const [idx, val] of Object.entries(args)) {\n const formal = thisThing.formals[idx];\n argsObj[formal] = val;\n }\n\n const oldArgs = this.args;\n this.args = argsObj;\n const ans = thisThing.execute(this._semantics, this);\n this.args = oldArgs;\n return ans;\n }\n\n if (type === 'operation') {\n this.Wrapper.prototype[name] = doIt;\n this.Wrapper.prototype[name].toString = function() {\n return '[' + name + ' operation]';\n };\n } else {\n Object.defineProperty(this.Wrapper.prototype, name, {\n get: doIt,\n configurable: true, // So the property can be deleted.\n });\n Object.defineProperty(this.attributeKeys, name, {\n value: util.uniqueId(name),\n });\n }\n};\n\nSemantics.prototype.extendOperationOrAttribute = function(type, name, actionDict) {\n const typePlural = type + 's';\n\n // Make sure that `name` really is just a name, i.e., that it doesn't also contain formals.\n parseSignature(name, 'attribute');\n\n if (!(this.super && name in this.super[typePlural])) {\n throw new Error(\n 'Cannot extend ' +\n type +\n \" '\" +\n name +\n \"': did not inherit an \" +\n type +\n ' with that name'\n );\n }\n if (hasOwnProperty(this[typePlural], name)) {\n throw new Error('Cannot extend ' + type + \" '\" + name + \"' again\");\n }\n\n // Create a new operation / attribute whose actionDict delegates to the super operation /\n // attribute's actionDict, and which has all the keys from `inheritedActionDict`.\n const inheritedFormals = this[typePlural][name].formals;\n const inheritedActionDict = this[typePlural][name].actionDict;\n const newActionDict = Object.create(inheritedActionDict);\n Object.keys(actionDict).forEach(name => {\n newActionDict[name] = actionDict[name];\n });\n\n this[typePlural][name] =\n type === 'operation' ?\n new Operation(name, inheritedFormals, newActionDict) :\n new Attribute(name, newActionDict);\n\n // The following check is not strictly necessary (it will happen later anyway) but it's better to\n // catch errors early.\n this[typePlural][name].checkActionDict(this.grammar);\n};\n\nSemantics.prototype.assertNewName = function(name, type) {\n if (hasOwnProperty(Wrapper.prototype, name)) {\n throw new Error('Cannot add ' + type + \" '\" + name + \"': that's a reserved name\");\n }\n if (name in this.operations) {\n throw new Error(\n 'Cannot add ' + type + \" '\" + name + \"': an operation with that name already exists\"\n );\n }\n if (name in this.attributes) {\n throw new Error(\n 'Cannot add ' + type + \" '\" + name + \"': an attribute with that name already exists\"\n );\n }\n};\n\n// Returns a wrapper for the given CST `node` in this semantics.\n// If `node` is already a wrapper, returns `node` itself. // TODO: why is this needed?\nSemantics.prototype.wrap = function(node, source, optBaseInterval) {\n const baseInterval = optBaseInterval || source;\n return node instanceof this.Wrapper ? node : new this.Wrapper(node, source, baseInterval);\n};\n\n// Creates a new Semantics instance for `grammar`, inheriting operations and attributes from\n// `optSuperSemantics`, if it is specified. Returns a function that acts as a proxy for the new\n// Semantics instance. When that function is invoked with a CST node as an argument, it returns\n// a wrapper for that node which gives access to the operations and attributes provided by this\n// semantics.\nSemantics.createSemantics = function(grammar, optSuperSemantics) {\n const s = new Semantics(\n grammar,\n optSuperSemantics !== undefined ?\n optSuperSemantics :\n Semantics.BuiltInSemantics._getSemantics()\n );\n\n // To enable clients to invoke a semantics like a function, return a function that acts as a proxy\n // for `s`, which is the real `Semantics` instance.\n const proxy = function ASemantics(matchResult) {\n if (!(matchResult instanceof MatchResult)) {\n throw new TypeError(\n 'Semantics expected a MatchResult, but got ' +\n common.unexpectedObjToString(matchResult)\n );\n }\n if (matchResult.failed()) {\n throw new TypeError('cannot apply Semantics to ' + matchResult.toString());\n }\n\n const cst = matchResult._cst;\n if (cst.grammar !== grammar) {\n throw new Error(\n \"Cannot use a MatchResult from grammar '\" +\n cst.grammar.name +\n \"' with a semantics for '\" +\n grammar.name +\n \"'\"\n );\n }\n const inputStream = new InputStream(matchResult.input);\n return s.wrap(cst, inputStream.interval(matchResult._cstOffset, matchResult.input.length));\n };\n\n // Forward public methods from the proxy to the semantics instance.\n proxy.addOperation = function(signature, actionDict) {\n s.addOperationOrAttribute('operation', signature, actionDict);\n return proxy;\n };\n proxy.extendOperation = function(name, actionDict) {\n s.extendOperationOrAttribute('operation', name, actionDict);\n return proxy;\n };\n proxy.addAttribute = function(name, actionDict) {\n s.addOperationOrAttribute('attribute', name, actionDict);\n return proxy;\n };\n proxy.extendAttribute = function(name, actionDict) {\n s.extendOperationOrAttribute('attribute', name, actionDict);\n return proxy;\n };\n proxy._getActionDict = function(operationOrAttributeName) {\n const action =\n s.operations[operationOrAttributeName] || s.attributes[operationOrAttributeName];\n if (!action) {\n throw new Error(\n '\"' +\n operationOrAttributeName +\n '\" is not a valid operation or attribute ' +\n 'name in this semantics for \"' +\n grammar.name +\n '\"'\n );\n }\n return action.actionDict;\n };\n proxy._remove = function(operationOrAttributeName) {\n let semantic;\n if (operationOrAttributeName in s.operations) {\n semantic = s.operations[operationOrAttributeName];\n delete s.operations[operationOrAttributeName];\n } else if (operationOrAttributeName in s.attributes) {\n semantic = s.attributes[operationOrAttributeName];\n delete s.attributes[operationOrAttributeName];\n }\n delete s.Wrapper.prototype[operationOrAttributeName];\n return semantic;\n };\n proxy.getOperationNames = function() {\n return Object.keys(s.operations);\n };\n proxy.getAttributeNames = function() {\n return Object.keys(s.attributes);\n };\n proxy.getGrammar = function() {\n return s.grammar;\n };\n proxy.toRecipe = function(semanticsOnly) {\n return s.toRecipe(semanticsOnly);\n };\n\n // Make the proxy's toString() work.\n proxy.toString = s.toString.bind(s);\n\n // Returns the semantics for the proxy.\n proxy._getSemantics = function() {\n return s;\n };\n\n return proxy;\n};\n\n// ----------------- Operation -----------------\n\n// An Operation represents a function to be applied to a concrete syntax tree (CST) -- it's very\n// similar to a Visitor (http://en.wikipedia.org/wiki/Visitor_pattern). An operation is executed by\n// recursively walking the CST, and at each node, invoking the matching semantic action from\n// `actionDict`. See `Operation.prototype.execute` for details of how a CST node's matching semantic\n// action is found.\nclass Operation {\n constructor(name, formals, actionDict, builtInDefault) {\n this.name = name;\n this.formals = formals;\n this.actionDict = actionDict;\n this.builtInDefault = builtInDefault;\n }\n\n checkActionDict(grammar) {\n grammar._checkTopDownActionDict(this.typeName, this.name, this.actionDict);\n }\n\n // Execute this operation on the CST node associated with `nodeWrapper` in the context of the\n // given Semantics instance.\n execute(semantics, nodeWrapper) {\n try {\n // Look for a semantic action whose name matches the node's constructor name, which is either\n // the name of a rule in the grammar, or '_terminal' (for a terminal node), or '_iter' (for an\n // iteration node).\n const {ctorName} = nodeWrapper._node;\n let actionFn = this.actionDict[ctorName];\n if (actionFn) {\n globalActionStack.push([this, ctorName]);\n return actionFn.apply(nodeWrapper, nodeWrapper._children());\n }\n\n // The action dictionary does not contain a semantic action for this specific type of node.\n // If this is a nonterminal node and the programmer has provided a `_nonterminal` semantic\n // action, we invoke it:\n if (nodeWrapper.isNonterminal()) {\n actionFn = this.actionDict._nonterminal;\n if (actionFn) {\n globalActionStack.push([this, '_nonterminal', ctorName]);\n return actionFn.apply(nodeWrapper, nodeWrapper._children());\n }\n }\n\n // Otherwise, we invoke the '_default' semantic action.\n globalActionStack.push([this, 'default action', ctorName]);\n return this.actionDict._default.apply(nodeWrapper, nodeWrapper._children());\n } finally {\n globalActionStack.pop();\n }\n }\n}\n\nOperation.prototype.typeName = 'operation';\n\n// ----------------- Attribute -----------------\n\n// Attributes are Operations whose results are memoized. This means that, for any given semantics,\n// the semantic action for a CST node will be invoked no more than once.\nclass Attribute extends Operation {\n constructor(name, actionDict, builtInDefault) {\n super(name, [], actionDict, builtInDefault);\n }\n\n execute(semantics, nodeWrapper) {\n const node = nodeWrapper._node;\n const key = semantics.attributeKeys[this.name];\n if (!hasOwnProperty(node, key)) {\n // The following is a super-send -- isn't JS beautiful? :/\n node[key] = Operation.prototype.execute.call(this, semantics, nodeWrapper);\n }\n return node[key];\n }\n}\n\nAttribute.prototype.typeName = 'attribute';\n\n// ----------------- Deferred initialization -----------------\n\nutil.awaitBuiltInRules(builtInRules => {\n const operationsAndAttributesGrammar = require('../dist/operations-and-attributes');\n initBuiltInSemantics(builtInRules);\n initPrototypeParser(operationsAndAttributesGrammar); // requires BuiltInSemantics\n});\n\nfunction initBuiltInSemantics(builtInRules) {\n const actions = {\n empty() {\n return this.iteration();\n },\n nonEmpty(first, _, rest) {\n return this.iteration([first].concat(rest.children));\n },\n };\n\n Semantics.BuiltInSemantics = Semantics.createSemantics(builtInRules, null).addOperation(\n 'asIteration',\n {\n emptyListOf: actions.empty,\n nonemptyListOf: actions.nonEmpty,\n EmptyListOf: actions.empty,\n NonemptyListOf: actions.nonEmpty,\n }\n );\n}\n\nfunction initPrototypeParser(grammar) {\n prototypeGrammarSemantics = grammar.createSemantics().addOperation('parse', {\n AttributeSignature(name) {\n return {\n name: name.parse(),\n formals: [],\n };\n },\n OperationSignature(name, optFormals) {\n return {\n name: name.parse(),\n formals: optFormals.children.map(c => c.parse())[0] || [],\n };\n },\n Formals(oparen, fs, cparen) {\n return fs.asIteration().children.map(c => c.parse());\n },\n name(first, rest) {\n return this.sourceString;\n },\n });\n prototypeGrammar = grammar;\n}\n\n// --------------------------------------------------------------------\n// Exports\n// --------------------------------------------------------------------\n\nmodule.exports = Semantics;\n","var ohm = require('..');\nmodule.exports = ohm.makeRecipe([\"grammar\",{\"source\":\"OperationsAndAttributes {\\n\\n AttributeSignature =\\n name\\n\\n OperationSignature =\\n name Formals?\\n\\n Formals\\n = \\\"(\\\" ListOf<name, \\\",\\\"> \\\")\\\"\\n\\n name (a name)\\n = nameFirst nameRest*\\n\\n nameFirst\\n = \\\"_\\\"\\n | letter\\n\\n nameRest\\n = \\\"_\\\"\\n | alnum\\n\\n}\"},\"OperationsAndAttributes\",null,\"AttributeSignature\",{\"AttributeSignature\":[\"define\",{\"sourceInterval\":[29,58]},null,[],[\"app\",{\"sourceInterval\":[54,58]},\"name\",[]]],\"OperationSignature\":[\"define\",{\"sourceInterval\":[62,100]},null,[],[\"seq\",{\"sourceInterval\":[87,100]},[\"app\",{\"sourceInterval\":[87,91]},\"name\",[]],[\"opt\",{\"sourceInterval\":[92,100]},[\"app\",{\"sourceInterval\":[92,99]},\"Formals\",[]]]]],\"Formals\":[\"define\",{\"sourceInterval\":[104,143]},null,[],[\"seq\",{\"sourceInterval\":[118,143]},[\"terminal\",{\"sourceInterval\":[118,121]},\"(\"],[\"app\",{\"sourceInterval\":[122,139]},\"ListOf\",[[\"app\",{\"sourceInterval\":[129,133]},\"name\",[]],[\"terminal\",{\"sourceInterval\":[135,138]},\",\"]]],[\"terminal\",{\"sourceInterval\":[140,143]},\")\"]]],\"name\":[\"define\",{\"sourceInterval\":[147,187]},\"a name\",[],[\"seq\",{\"sourceInterval\":[168,187]},[\"app\",{\"sourceInterval\":[168,177]},\"nameFirst\",[]],[\"star\",{\"sourceInterval\":[178,187]},[\"app\",{\"sourceInterval\":[178,186]},\"nameRest\",[]]]]],\"nameFirst\":[\"define\",{\"sourceInterval\":[191,223]},null,[],[\"alt\",{\"sourceInterval\":[207,223]},[\"terminal\",{\"sourceInterval\":[207,210]},\"_\"],[\"app\",{\"sourceInterval\":[217,223]},\"letter\",[]]]],\"nameRest\":[\"define\",{\"sourceInterval\":[227,257]},null,[],[\"alt\",{\"sourceInterval\":[242,257]},[\"terminal\",{\"sourceInterval\":[242,245]},\"_\"],[\"app\",{\"sourceInterval\":[252,257]},\"alnum\",[]]]]}]);\n","'use strict';\n\n// --------------------------------------------------------------------\n// Imports\n// --------------------------------------------------------------------\n\nconst CaseInsensitiveTerminal = require('./CaseInsensitiveTerminal');\nconst Matcher = require('./Matcher');\nconst Semantics = require('./Semantics');\nconst common = require('./common');\nconst errors = require('./errors');\nconst pexprs = require('./pexprs');\n\n// --------------------------------------------------------------------\n// Private stuff\n// --------------------------------------------------------------------\n\nconst SPECIAL_ACTION_NAMES = ['_iter', '_terminal', '_nonterminal', '_default'];\n\nfunction getSortedRuleValues(grammar) {\n return Object.keys(grammar.rules)\n .sort()\n .map(name => grammar.rules[name]);\n}\n\n// Until ES2019, JSON was not a valid subset of JavaScript because U+2028 (line separator)\n// and U+2029 (paragraph separator) are allowed in JSON string literals, but not in JS.\n// This function properly encodes those two characters so that the resulting string is\n// represents both valid JSON, and valid JavaScript (for ES2018 and below).\n// See https://v8.dev/features/subsume-json for more details.\nconst jsonToJS = str => str.replace(/\\u2028/g, '\\\\u2028').replace(/\\u2029/g, '\\\\u2029');\n\nfunction Grammar(name, superGrammar, rules, optDefaultStartRule) {\n this.name = name;\n this.superGrammar = superGrammar;\n this.rules = rules;\n if (optDefaultStartRule) {\n if (!(optDefaultStartRule in rules)) {\n throw new Error(\n \"Invalid start rule: '\" +\n optDefaultStartRule +\n \"' is not a rule in grammar '\" +\n name +\n \"'\"\n );\n }\n this.defaultStartRule = optDefaultStartRule;\n }\n}\n\nlet ohmGrammar;\nlet buildGrammar;\n\n// This method is called from main.js once Ohm has loaded.\nGrammar.initApplicationParser = function(grammar, builderFn) {\n ohmGrammar = grammar;\n buildGrammar = builderFn;\n};\n\nGrammar.prototype = {\n matcher() {\n return new Matcher(this);\n },\n\n // Return true if the grammar is a built-in grammar, otherwise false.\n // NOTE: This might give an unexpected result if called before BuiltInRules is defined!\n isBuiltIn() {\n return this === Grammar.ProtoBuiltInRules || this === Grammar.BuiltInRules;\n },\n\n equals(g) {\n if (this === g) {\n return true;\n }\n // Do the cheapest comparisons first.\n if (\n g == null ||\n this.name !== g.name ||\n this.defaultStartRule !== g.defaultStartRule ||\n !(this.superGrammar === g.superGrammar || this.superGrammar.equals(g.superGrammar))\n ) {\n return false;\n }\n const myRules = getSortedRuleValues(this);\n const otherRules = getSortedRuleValues(g);\n return (\n myRules.length === otherRules.length &&\n myRules.every((rule, i) => {\n return (\n rule.description === otherRules[i].description &&\n rule.formals.join(',') === otherRules[i].formals.join(',') &&\n rule.body.toString() === otherRules[i].body.toString()\n );\n })\n );\n },\n\n match(input, optStartApplication) {\n const m = this.matcher();\n m.replaceInputRange(0, 0, input);\n return m.match(optStartApplication);\n },\n\n trace(input, optStartApplication) {\n const m = this.matcher();\n m.replaceInputRange(0, 0, input);\n return m.trace(optStartApplication);\n },\n\n createSemantics() {\n return Semantics.createSemantics(this);\n },\n\n extendSemantics(superSemantics) {\n return Semantics.createSemantics(this, superSemantics._getSemantics());\n },\n\n // Check that every key in `actionDict` corresponds to a semantic action, and that it maps to\n // a function of the correct arity. If not, throw an exception.\n _checkTopDownActionDict(what, name, actionDict) {\n const problems = [];\n\n // eslint-disable-next-line guard-for-in\n for (const k in actionDict) {\n const v = actionDict[k];\n const isSpecialAction = SPECIAL_ACTION_NAMES.includes(k);\n\n if (!isSpecialAction && !(k in this.rules)) {\n problems.push(`'${k}' is not a valid semantic action for '${this.name}'`);\n continue;\n }\n if (typeof v !== 'function') {\n problems.push(`'${k}' must be a function in an action dictionary for '${this.name}'`);\n continue;\n }\n const actual = v.length;\n const expected = this._topDownActionArity(k);\n if (actual !== expected) {\n let details;\n if (k === '_iter' || k === '_nonterminal') {\n details =\n `it should use a rest parameter, e.g. \\`${k}(...children) {}\\`. ` +\n 'NOTE: this is new in Ohm v16 — see https://git.io/Jz4CI for details.';\n } else {\n details = `expected ${expected}, got ${actual}`;\n }\n problems.push(`Semantic action '${k}' has the wrong arity: ${details}`);\n }\n }\n if (problems.length > 0) {\n const prettyProblems = problems.map(problem => '- ' + problem);\n const error = new Error(\n [\n `Found errors in the action dictionary of the '${name}' ${what}:`,\n ...prettyProblems,\n ].join('\\n')\n );\n error.problems = problems;\n throw error;\n }\n },\n\n // Return the expected arity for a semantic action named `actionName`, which\n // is either a rule name or a special action name like '_nonterminal'.\n _topDownActionArity(actionName) {\n // All special actions have an expected arity of 0, though all but _terminal\n // are expected to use the rest parameter syntax (e.g. `_iter(...children)`).\n // This is considered to have arity 0, i.e. `((...args) => {}).length` is 0.\n return SPECIAL_ACTION_NAMES.includes(actionName) ?\n 0 :\n this.rules[actionName].body.getArity();\n },\n\n _inheritsFrom(grammar) {\n let g = this.superGrammar;\n while (g) {\n if (g.equals(grammar, true)) {\n return true;\n }\n g = g.superGrammar;\n }\n return false;\n },\n\n toRecipe(superGrammarExpr = undefined) {\n const metaInfo = {};\n // Include the grammar source if it is available.\n if (this.source) {\n metaInfo.source = this.source.contents;\n }\n\n let startRule = null;\n if (this.defaultStartRule) {\n startRule = this.defaultStartRule;\n }\n\n const rules = {};\n Object.keys(this.rules).forEach(ruleName => {\n const ruleInfo = this.rules[ruleName];\n const {body} = ruleInfo;\n const isDefinition = !this.superGrammar || !this.superGrammar.rules[ruleName];\n\n let operation;\n if (isDefinition) {\n operation = 'define';\n } else {\n operation = body instanceof pexprs.Extend ? 'extend' : 'override';\n }\n\n const metaInfo = {};\n if (ruleInfo.source && this.source) {\n const adjusted = ruleInfo.source.relativeTo(this.source);\n metaInfo.sourceInterval = [adjusted.startIdx, adjusted.endIdx];\n }\n\n const description = isDefinition ? ruleInfo.description : null;\n const bodyRecipe = body.outputRecipe(ruleInfo.formals, this.source);\n\n rules[ruleName] = [\n operation, // \"define\"/\"extend\"/\"override\"\n metaInfo,\n description,\n ruleInfo.formals,\n bodyRecipe,\n ];\n });\n\n // If the caller provided an expression to use for the supergrammar, use that.\n // Otherwise, if the supergrammar is a user grammar, use its recipe inline.\n let superGrammarOutput = 'null';\n if (superGrammarExpr) {\n superGrammarOutput = superGrammarExpr;\n } else if (this.superGrammar && !this.superGrammar.isBuiltIn()) {\n superGrammarOutput = this.superGrammar.toRecipe();\n }\n\n const recipeElements = [\n ...['grammar', metaInfo, this.name].map(JSON.stringify),\n superGrammarOutput,\n ...[startRule, rules].map(JSON.stringify),\n ];\n return jsonToJS(`[${recipeElements.join(',')}]`);\n },\n\n // TODO: Come up with better names for these methods.\n // TODO: Write the analog of these methods for inherited attributes.\n toOperationActionDictionaryTemplate() {\n return this._toOperationOrAttributeActionDictionaryTemplate();\n },\n toAttributeActionDictionaryTemplate() {\n return this._toOperationOrAttributeActionDictionaryTemplate();\n },\n\n _toOperationOrAttributeActionDictionaryTemplate() {\n // TODO: add the super-grammar's templates at the right place, e.g., a case for AddExpr_plus\n // should appear next to other cases of AddExpr.\n\n const sb = new common.StringBuffer();\n sb.append('{');\n\n let first = true;\n // eslint-disable-next-line guard-for-in\n for (const ruleName in this.rules) {\n const {body} = this.rules[ruleName];\n if (first) {\n first = false;\n } else {\n sb.append(',');\n }\n sb.append('\\n');\n sb.append(' ');\n this.addSemanticActionTemplate(ruleName, body, sb);\n }\n\n sb.append('\\n}');\n return sb.contents();\n },\n\n addSemanticActionTemplate(ruleName, body, sb) {\n sb.append(ruleName);\n sb.append(': function(');\n const arity = this._topDownActionArity(ruleName);\n sb.append(common.repeat('_', arity).join(', '));\n sb.append(') {\\n');\n sb.append(' }');\n },\n\n // Parse a string which expresses a rule application in this grammar, and return the\n // resulting Apply node.\n parseApplication(str) {\n let app;\n if (str.indexOf('<') === -1) {\n // simple application\n app = new pexprs.Apply(str);\n } else {\n // parameterized application\n const cst = ohmGrammar.match(str, 'Base_application');\n app = buildGrammar(cst, {});\n }\n\n // Ensure that the application is valid.\n if (!(app.ruleName in this.rules)) {\n throw errors.undeclaredRule(app.ruleName, this.name);\n }\n const {formals} = this.rules[app.ruleName];\n if (formals.length !== app.args.length) {\n const {source} = this.rules[app.ruleName];\n throw errors.wrongNumberOfParameters(\n app.ruleName,\n formals.length,\n app.args.length,\n source\n );\n }\n return app;\n },\n};\n\n// The following grammar contains a few rules that couldn't be written in \"userland\".\n// At the bottom of src/main.js, we create a sub-grammar of this grammar that's called\n// `BuiltInRules`. That grammar contains several convenience rules, e.g., `letter` and\n// `digit`, and is implicitly the super-grammar of any grammar whose super-grammar\n// isn't specified.\nGrammar.ProtoBuiltInRules = new Grammar(\n 'ProtoBuiltInRules', // name\n undefined, // supergrammar\n {\n any: {\n body: pexprs.any,\n formals: [],\n description: 'any character',\n primitive: true,\n },\n end: {\n body: pexprs.end,\n formals: [],\n description: 'end of input',\n primitive: true,\n },\n\n caseInsensitive: {\n body: new CaseInsensitiveTerminal(new pexprs.Param(0)),\n formals: ['str'],\n primitive: true,\n },\n lower: {\n body: new pexprs.UnicodeChar('Ll'),\n formals: [],\n description: 'a lowercase letter',\n primitive: true,\n },\n upper: {\n body: new pexprs.UnicodeChar('Lu'),\n formals: [],\n description: 'an uppercase letter',\n primitive: true,\n },\n // Union of Lt (titlecase), Lm (modifier), and Lo (other), i.e. any letter not in Ll or Lu.\n unicodeLtmo: {\n body: new pexprs.UnicodeChar('Ltmo'),\n formals: [],\n description: 'a Unicode character in Lt, Lm, or Lo',\n primitive: true,\n },\n\n // These rules are not truly primitive (they could be written in userland) but are defined\n // here for bootstrapping purposes.\n spaces: {\n body: new pexprs.Star(new pexprs.Apply('space')),\n formals: [],\n },\n space: {\n body: new pexprs.Range('\\x00', ' '),\n formals: [],\n description: 'a space',\n },\n }\n);\n\n// --------------------------------------------------------------------\n// Exports\n// --------------------------------------------------------------------\n\nmodule.exports = Grammar;\n","'use strict';\n\n// --------------------------------------------------------------------\n// Imports\n// --------------------------------------------------------------------\n\nconst Grammar = require('./Grammar');\nconst InputStream = require('./InputStream');\nconst common = require('./common');\nconst errors = require('./errors');\nconst pexprs = require('./pexprs');\n\n// --------------------------------------------------------------------\n// Private Stuff\n// --------------------------------------------------------------------\n\n// Constructors\n\nfunction GrammarDecl(name) {\n this.name = name;\n}\n\n// Helpers\n\nGrammarDecl.prototype.sourceInterval = function(startIdx, endIdx) {\n return this.source.subInterval(startIdx, endIdx - startIdx);\n};\n\nGrammarDecl.prototype.ensureSuperGrammar = function() {\n if (!this.superGrammar) {\n this.withSuperGrammar(\n // TODO: The conditional expression below is an ugly hack. It's kind of ok because\n // I doubt anyone will ever try to declare a grammar called `BuiltInRules`. Still,\n // we should try to find a better way to do this.\n this.name === 'BuiltInRules' ? Grammar.ProtoBuiltInRules : Grammar.BuiltInRules\n );\n }\n return this.superGrammar;\n};\n\nGrammarDecl.prototype.ensureSuperGrammarRuleForOverriding = function(name, source) {\n const ruleInfo = this.ensureSuperGrammar().rules[name];\n if (!ruleInfo) {\n throw errors.cannotOverrideUndeclaredRule(name, this.superGrammar.name, source);\n }\n return ruleInfo;\n};\n\nGrammarDecl.prototype.installOverriddenOrExtendedRule = function(\n name,\n formals,\n body,\n source\n) {\n const duplicateParameterNames = common.getDuplicates(formals);\n if (duplicateParameterNames.length > 0) {\n throw errors.duplicateParameterNames(name, duplicateParameterNames, source);\n }\n const ruleInfo = this.ensureSuperGrammar().rules[name];\n const expectedFormals = ruleInfo.formals;\n const expectedNumFormals = expectedFormals ? expectedFormals.length : 0;\n if (formals.length !== expectedNumFormals) {\n throw errors.wrongNumberOfParameters(name, expectedNumFormals, formals.length, source);\n }\n return this.install(name, formals, body, ruleInfo.description, source);\n};\n\nGrammarDecl.prototype.install = function(name, formals, body, description, source) {\n this.rules[name] = {\n body: body.introduceParams(formals),\n formals,\n description,\n source,\n };\n return this;\n};\n\n// Stuff that you should only do once\n\nGrammarDecl.prototype.withSuperGrammar = function(superGrammar) {\n if (this.superGrammar) {\n throw new Error('the super grammar of a GrammarDecl cannot be set more than once');\n }\n this.superGrammar = superGrammar;\n this.rules = Object.create(superGrammar.rules);\n\n // Grammars with an explicit supergrammar inherit a default start rule.\n if (!superGrammar.isBuiltIn()) {\n this.defaultStartRule = superGrammar.defaultStartRule;\n }\n return this;\n};\n\nGrammarDecl.prototype.withDefaultStartRule = function(ruleName) {\n this.defaultStartRule = ruleName;\n return this;\n};\n\nGrammarDecl.prototype.withSource = function(source) {\n this.source = new InputStream(source).interval(0, source.length);\n return this;\n};\n\n// Creates a Grammar instance, and if it passes the sanity checks, returns it.\nGrammarDecl.prototype.build = function() {\n const grammar = new Grammar(\n this.name,\n this.ensureSuperGrammar(),\n this.rules,\n this.defaultStartRule\n );\n\n // TODO: change the pexpr.prototype.assert... methods to make them add\n // exceptions to an array that's provided as an arg. Then we'll be able to\n // show more than one error of the same type at a time.\n // TODO: include the offending pexpr in the errors, that way we can show\n // the part of the source that caused it.\n const grammarErrors = [];\n let grammarHasInvalidApplications = false;\n Object.keys(grammar.rules).forEach(ruleName => {\n const {body} = grammar.rules[ruleName];\n try {\n body.assertChoicesHaveUniformArity(ruleName);\n } catch (e) {\n grammarErrors.push(e);\n }\n try {\n body.assertAllApplicationsAreValid(ruleName, grammar);\n } catch (e) {\n grammarErrors.push(e);\n grammarHasInvalidApplications = true;\n }\n });\n if (!grammarHasInvalidApplications) {\n // The following check can only be done if the grammar has no invalid applications.\n Object.keys(grammar.rules).forEach(ruleName => {\n const {body} = grammar.rules[ruleName];\n try {\n body.assertIteratedExprsAreNotNullable(grammar, []);\n } catch (e) {\n grammarErrors.push(e);\n }\n });\n }\n if (grammarErrors.length > 0) {\n errors.throwErrors(grammarErrors);\n }\n if (this.source) {\n grammar.source = this.source;\n }\n\n return grammar;\n};\n\n// Rule declarations\n\nGrammarDecl.prototype.define = function(name, formals, body, description, source) {\n this.ensureSuperGrammar();\n if (this.superGrammar.rules[name]) {\n throw errors.duplicateRuleDeclaration(name, this.name, this.superGrammar.name, source);\n } else if (this.rules[name]) {\n throw errors.duplicateRuleDeclaration(name, this.name, this.name, source);\n }\n const duplicateParameterNames = common.getDuplicates(formals);\n if (duplicateParameterNames.length > 0) {\n throw errors.duplicateParameterNames(name, duplicateParameterNames, source);\n }\n return this.install(name, formals, body, description, source);\n};\n\nGrammarDecl.prototype.override = function(name, formals, body, descIgnored, source) {\n this.ensureSuperGrammarRuleForOverriding(name, source);\n this.installOverriddenOrExtendedRule(name, formals, body, source);\n return this;\n};\n\nGrammarDecl.prototype.extend = function(name, formals, fragment, descIgnored, source) {\n const ruleInfo = this.ensureSuperGrammar().rules[name];\n if (!ruleInfo) {\n throw errors.cannotExtendUndeclaredRule(name, this.superGrammar.name, source);\n }\n const body = new pexprs.Extend(this.superGrammar, name, fragment);\n body.source = fragment.source;\n this.installOverriddenOrExtendedRule(name, formals, body, source);\n return this;\n};\n\n// --------------------------------------------------------------------\n// Exports\n// --------------------------------------------------------------------\n\nmodule.exports = GrammarDecl;\n","'use strict';\n\n// --------------------------------------------------------------------\n// Imports\n// --------------------------------------------------------------------\n\nconst Grammar = require('./Grammar');\nconst GrammarDecl = require('./GrammarDecl');\nconst pexprs = require('./pexprs');\n\n// --------------------------------------------------------------------\n// Private stuff\n// --------------------------------------------------------------------\n\nfunction Builder() {}\n\nBuilder.prototype = {\n currentDecl: null,\n currentRuleName: null,\n\n newGrammar(name) {\n return new GrammarDecl(name);\n },\n\n grammar(metaInfo, name, superGrammar, defaultStartRule, rules) {\n const gDecl = new GrammarDecl(name);\n if (superGrammar) {\n // `superGrammar` may be a recipe (i.e. an Array), or an actual grammar instance.\n gDecl.withSuperGrammar(\n superGrammar instanceof Grammar ? superGrammar : this.fromRecipe(superGrammar)\n );\n }\n if (defaultStartRule) {\n gDecl.withDefaultStartRule(defaultStartRule);\n }\n if (metaInfo && metaInfo.source) {\n gDecl.withSource(metaInfo.source);\n }\n\n this.currentDecl = gDecl;\n Object.keys(rules).forEach(ruleName => {\n this.currentRuleName = ruleName;\n const ruleRecipe = rules[ruleName];\n\n const action = ruleRecipe[0]; // define/extend/override\n const metaInfo = ruleRecipe[1];\n const description = ruleRecipe[2];\n const formals = ruleRecipe[3];\n const body = this.fromRecipe(ruleRecipe[4]);\n\n let source;\n if (gDecl.source && metaInfo && metaInfo.sourceInterval) {\n source = gDecl.source.subInterval(\n metaInfo.sourceInterval[0],\n metaInfo.sourceInterval[1] - metaInfo.sourceInterval[0]\n );\n }\n gDecl[action](ruleName, formals, body, description, source);\n });\n this.currentRuleName = this.currentDecl = null;\n return gDecl.build();\n },\n\n terminal(x) {\n return new pexprs.Terminal(x);\n },\n\n range(from, to) {\n return new pexprs.Range(from, to);\n },\n\n param(index) {\n return new pexprs.Param(index);\n },\n\n alt(...termArgs) {\n let terms = [];\n for (let arg of termArgs) {\n if (!(arg instanceof pexprs.PExpr)) {\n arg = this.fromRecipe(arg);\n }\n if (arg instanceof pexprs.Alt) {\n terms = terms.concat(arg.terms);\n } else {\n terms.push(arg);\n }\n }\n return terms.length === 1 ? terms[0] : new pexprs.Alt(terms);\n },\n\n seq(...factorArgs) {\n let factors = [];\n for (let arg of factorArgs) {\n if (!(arg instanceof pexprs.PExpr)) {\n arg = this.fromRecipe(arg);\n }\n if (arg instanceof pexprs.Seq) {\n factors = factors.concat(arg.factors);\n } else {\n factors.push(arg);\n }\n }\n return factors.length === 1 ? factors[0] : new pexprs.Seq(factors);\n },\n\n star(expr) {\n if (!(expr instanceof pexprs.PExpr)) {\n expr = this.fromRecipe(expr);\n }\n return new pexprs.Star(expr);\n },\n\n plus(expr) {\n if (!(expr instanceof pexprs.PExpr)) {\n expr = this.fromRecipe(expr);\n }\n return new pexprs.Plus(expr);\n },\n\n opt(expr) {\n if (!(expr instanceof pexprs.PExpr)) {\n expr = this.fromRecipe(expr);\n }\n return new pexprs.Opt(expr);\n },\n\n not(expr) {\n if (!(expr instanceof pexprs.PExpr)) {\n expr = this.fromRecipe(expr);\n }\n return new pexprs.Not(expr);\n },\n\n la(expr) {\n // TODO: temporary to still be able to read old recipes\n return this.lookahead(expr);\n },\n\n lookahead(expr) {\n if (!(expr instanceof pexprs.PExpr)) {\n expr = this.fromRecipe(expr);\n }\n return new pexprs.Lookahead(expr);\n },\n\n lex(expr) {\n if (!(expr instanceof pexprs.PExpr)) {\n expr = this.fromRecipe(expr);\n }\n return new pexprs.Lex(expr);\n },\n\n app(ruleName, optParams) {\n if (optParams && optParams.length > 0) {\n optParams = optParams.map(function(param) {\n return param instanceof pexprs.PExpr ? param : this.fromRecipe(param);\n }, this);\n }\n return new pexprs.Apply(ruleName, optParams);\n },\n\n // Note that unlike other methods in this class, this method cannot be used as a\n // convenience constructor. It only works with recipes, because it relies on\n // `this.currentDecl` and `this.currentRuleName` being set.\n splice(beforeTerms, afterTerms) {\n return new pexprs.Splice(\n this.currentDecl.superGrammar,\n this.currentRuleName,\n beforeTerms.map(term => this.fromRecipe(term)),\n afterTerms.map(term => this.fromRecipe(term))\n );\n },\n\n fromRecipe(recipe) {\n // the meta-info of 'grammar' is processed in Builder.grammar\n const args = recipe[0] === 'grammar' ? recipe.slice(1) : recipe.slice(2);\n const result = this[recipe[0]](...args);\n\n const metaInfo = recipe[1];\n if (metaInfo) {\n if (metaInfo.sourceInterval && this.currentDecl) {\n result.withSource(this.currentDecl.sourceInterval(...metaInfo.sourceInterval));\n }\n }\n return result;\n },\n};\n\n// --------------------------------------------------------------------\n// Exports\n// --------------------------------------------------------------------\n\nmodule.exports = Builder;\n","'use strict';\n\n// --------------------------------------------------------------------\n// Imports\n// --------------------------------------------------------------------\n\nconst Builder = require('./Builder');\nconst Grammar = require('./Grammar');\nconst Namespace = require('./Namespace');\nconst common = require('./common');\nconst errors = require('./errors');\nconst pexprs = require('./pexprs');\nconst util = require('./util');\nconst version = require('./version');\n\n// --------------------------------------------------------------------\n// Private stuff\n// --------------------------------------------------------------------\n\n// The metagrammar, i.e. the grammar for Ohm grammars. Initialized at the\n// bottom of this file because loading the grammar requires Ohm itself.\nlet ohmGrammar;\n\nconst superSplicePlaceholder = Object.create(pexprs.PExpr.prototype);\n\nconst isBuffer = obj =>\n !!obj.constructor &&\n typeof obj.constructor.isBuffer === 'function' &&\n obj.constructor.isBuffer(obj);\n\n// Returns a Grammar instance (i.e., an object with a `match` method) for\n// `tree`, which is the concrete syntax tree of a user-written grammar.\n// The grammar will be assigned into `namespace` under the name of the grammar\n// as specified in the source.\nfunction buildGrammar(match, namespace, optOhmGrammarForTesting) {\n const builder = new Builder();\n let decl;\n let currentRuleName;\n let currentRuleFormals;\n let overriding = false;\n const metaGrammar = optOhmGrammarForTesting || ohmGrammar;\n\n // A visitor that produces a Grammar instance from the CST.\n const helpers = metaGrammar.createSemantics().addOperation('visit', {\n Grammars(grammarIter) {\n return grammarIter.children.map(c => c.visit());\n },\n Grammar(id, s, _open, rules, _close) {\n const grammarName = id.visit();\n decl = builder.newGrammar(grammarName, namespace);\n s.child(0) && s.child(0).visit();\n rules.children.map(c => c.visit());\n const g = decl.build();\n g.source = this.source.trimmed();\n if (grammarName in namespace) {\n throw errors.duplicateGrammarDeclaration(g, namespace);\n }\n namespace[grammarName] = g;\n return g;\n },\n\n SuperGrammar(_, n) {\n const superGrammarName = n.visit();\n if (superGrammarName === 'null') {\n decl.withSuperGrammar(null);\n } else {\n if (!namespace || !(superGrammarName in namespace)) {\n throw errors.undeclaredGrammar(superGrammarName, namespace, n.source);\n }\n decl.withSuperGrammar(namespace[superGrammarName]);\n }\n },\n\n Rule_define(n, fs, d, _, b) {\n currentRuleName = n.visit();\n currentRuleFormals = fs.children.map(c => c.visit())[0] || [];\n // If there is no default start rule yet, set it now. This must be done before visiting\n // the body, because it might contain an inline rule definition.\n if (!decl.defaultStartRule && decl.ensureSuperGrammar() !== Grammar.ProtoBuiltInRules) {\n decl.withDefaultStartRule(currentRuleName);\n }\n const body = b.visit();\n const description = d.children.map(c => c.visit())[0];\n const source = this.source.trimmed();\n return decl.define(currentRuleName, currentRuleFormals, body, description, source);\n },\n Rule_override(n, fs, _, b) {\n currentRuleName = n.visit();\n currentRuleFormals = fs.children.map(c => c.visit())[0] || [];\n\n const source = this.source.trimmed();\n decl.ensureSuperGrammarRuleForOverriding(currentRuleName, source);\n\n overriding = true;\n const body = b.visit();\n overriding = false;\n return decl.override(currentRuleName, currentRuleFormals, body, null, source);\n },\n Rule_extend(n, fs, _, b) {\n currentRuleName = n.visit();\n currentRuleFormals = fs.children.map(c => c.visit())[0] || [];\n const body = b.visit();\n const source = this.source.trimmed();\n return decl.extend(currentRuleName, currentRuleFormals, body, null, source);\n },\n RuleBody(_, terms) {\n return builder.alt(...terms.visit()).withSource(this.source);\n },\n OverrideRuleBody(_, terms) {\n const args = terms.visit();\n\n // Check if the super-splice operator (`...`) appears in the terms.\n const expansionPos = args.indexOf(superSplicePlaceholder);\n if (expansionPos >= 0) {\n const beforeTerms = args.slice(0, expansionPos);\n const afterTerms = args.slice(expansionPos + 1);\n\n // Ensure it appears no more than once.\n afterTerms.forEach(t => {\n if (t === superSplicePlaceholder) throw errors.multipleSuperSplices(t);\n });\n\n return new pexprs.Splice(\n decl.superGrammar,\n currentRuleName,\n beforeTerms,\n afterTerms\n ).withSource(this.source);\n } else {\n return builder.alt(...args).withSource(this.source);\n }\n },\n Formals(opointy, fs, cpointy) {\n return fs.visit();\n },\n\n Params(opointy, ps, cpointy) {\n return ps.visit();\n },\n\n Alt(seqs) {\n return builder.alt(...seqs.visit()).withSource(this.source);\n },\n\n TopLevelTerm_inline(b, n) {\n const inlineRuleName = currentRuleName + '_' + n.visit();\n const body = b.visit();\n const source = this.source.trimmed();\n const isNewRuleDeclaration = !(\n decl.superGrammar && decl.superGrammar.rules[inlineRuleName]\n );\n if (overriding && !isNewRuleDeclaration) {\n decl.override(inlineRuleName, currentRuleFormals, body, null, source);\n } else {\n decl.define(inlineRuleName, currentRuleFormals, body, null, source);\n }\n const params = currentRuleFormals.map(formal => builder.app(formal));\n return builder.app(inlineRuleName, params).withSource(body.source);\n },\n OverrideTopLevelTerm_superSplice(_) {\n return superSplicePlaceholder;\n },\n\n Seq(expr) {\n return builder.seq(...expr.children.map(c => c.visit())).withSource(this.source);\n },\n\n Iter_star(x, _) {\n return builder.star(x.visit()).withSource(this.source);\n },\n Iter_plus(x, _) {\n return builder.plus(x.visit()).withSource(this.source);\n },\n Iter_opt(x, _) {\n return builder.opt(x.visit()).withSource(this.source);\n },\n\n Pred_not(_, x) {\n return builder.not(x.visit()).withSource(this.source);\n },\n Pred_lookahead(_, x) {\n return builder.lookahead(x.visit()).withSource(this.source);\n },\n\n Lex_lex(_, x) {\n return builder.lex(x.visit()).withSource(this.source);\n },\n\n Base_application(rule, ps) {\n const params = ps.children.map(c => c.visit())[0] || [];\n return builder.app(rule.visit(), params).withSource(this.source);\n },\n Base_range(from, _, to) {\n return builder.range(from.visit(), to.visit()).withSource(this.source);\n },\n Base_terminal(expr) {\n return builder.terminal(expr.visit()).withSource(this.source);\n },\n Base_paren(open, x, close) {\n return x.visit();\n },\n\n ruleDescr(open, t, close) {\n return t.visit();\n },\n ruleDescrText(_) {\n return this.sourceString.trim();\n },\n\n caseName(_, space1, n, space2, end) {\n return n.visit();\n },\n\n name(first, rest) {\n return this.sourceString;\n },\n nameFirst(expr) {},\n nameRest(expr) {},\n\n terminal(open, cs, close) {\n return cs.children.map(c => c.visit()).join('');\n },\n\n oneCharTerminal(open, c, close) {\n return c.visit();\n },\n\n terminalChar(_) {\n return common.unescapeChar(this.sourceString);\n },\n\n escapeChar(_) {\n return this.sourceString;\n },\n\n NonemptyListOf(x, _, xs) {\n return [x.visit()].concat(xs.children.map(c => c.visit()));\n },\n EmptyListOf() {\n return [];\n },\n\n _terminal() {\n return this.sourceString;\n },\n });\n return helpers(match).visit();\n}\n\nfunction compileAndLoad(source, namespace) {\n const m = ohmGrammar.match(source, 'Grammars');\n if (m.failed()) {\n throw errors.grammarSyntaxError(m);\n }\n return buildGrammar(m, namespace);\n}\n\nfunction grammar(source, optNamespace) {\n const ns = grammars(source, optNamespace);\n\n // Ensure that the source contained no more than one grammar definition.\n const grammarNames = Object.keys(ns);\n if (grammarNames.length === 0) {\n throw new Error('Missing grammar definition');\n } else if (grammarNames.length > 1) {\n const secondGrammar = ns[grammarNames[1]];\n const interval = secondGrammar.source;\n throw new Error(\n util.getLineAndColumnMessage(interval.sourceString, interval.startIdx) +\n 'Found more than one grammar definition -- use ohm.grammars() instead.'\n );\n }\n return ns[grammarNames[0]]; // Return the one and only grammar.\n}\n\nfunction grammars(source, optNamespace) {\n const ns = Namespace.extend(Namespace.asNamespace(optNamespace));\n if (typeof source !== 'string') {\n // For convenience, detect Node.js Buffer objects and automatically call toString().\n if (isBuffer(source)) {\n source = source.toString();\n } else {\n throw new TypeError(\n 'Expected string as first argument, got ' + common.unexpectedObjToString(source)\n );\n }\n }\n compileAndLoad(source, ns);\n return ns;\n}\n\nfunction grammarFromScriptElement(optNode) {\n throw new Error(\n 'grammarFromScriptElement was removed in Ohm v16.0. See https://git.io/Jwow5 for more info.'\n );\n}\n\nfunction grammarsFromScriptElements(optNodeOrNodeList) {\n throw new Error(\n 'grammarsFromScriptElements was removed in Ohm v16.0. See https://git.io/Jwow5 for more info.'\n );\n}\n\nfunction makeRecipe(recipe) {\n if (typeof recipe === 'function') {\n return recipe.call(new Builder());\n } else {\n if (typeof recipe === 'string') {\n // stringified JSON recipe\n recipe = JSON.parse(recipe);\n }\n return new Builder().fromRecipe(recipe);\n }\n}\n\n// --------------------------------------------------------------------\n// Exports\n// --------------------------------------------------------------------\n\n// Stuff that users should know about\nmodule.exports = {\n createNamespace: Namespace.createNamespace,\n grammar,\n grammars,\n grammarFromScriptElement,\n grammarsFromScriptElements,\n makeRecipe,\n ohmGrammar: null, // Initialized below, after Grammar.BuiltInRules.\n pexprs,\n util,\n extras: require('../extras'),\n version,\n};\n\n// Stuff for testing, etc.\nmodule.exports._buildGrammar = buildGrammar;\n\n// Late initialization for stuff that is bootstrapped.\n\nGrammar.BuiltInRules = require('../dist/built-in-rules');\nutil.announceBuiltInRules(Grammar.BuiltInRules);\n\nmodule.exports.ohmGrammar = ohmGrammar = require('../dist/ohm-grammar');\nGrammar.initApplicationParser(ohmGrammar, buildGrammar);\n","{\n \"name\": \"ohm-js\",\n \"version\": \"16.0.0\",\n \"description\": \"An object-oriented language for parsing and pattern matching\",\n \"repository\": \"https://github.com/harc/ohm\",\n \"keywords\": [\n \"parser\",\n \"compiler\",\n \"pattern matching\",\n \"pattern-matching\",\n \"ometa\",\n \"ometa/js\",\n \"ometa-js\",\n \"ometajs\",\n \"rapid\",\n \"prototyping\"\n ],\n \"homepage\": \"https://ohmlang.github.io/\",\n \"bugs\": \"https://github.com/harc/ohm/issues\",\n \"main\": \"src/main.js\",\n \"files\": [\n \"src\",\n \"dist\",\n \"extras\",\n \"third_party\",\n \"index.d.ts\"\n ],\n \"types\": \"index.d.ts\",\n \"scripts\": {\n \"prebootstrap\": \"bash scripts/prebootstrap\",\n \"bootstrap\": \"bash scripts/bootstrap --test || (echo 'Bootstrap failed.' && mv -v dist/ohm-grammar.js.old dist/ohm-grammar.js && mv -v dist/built-in-rules.js.old dist/built-in-rules.js && mv -v dist/operations-and-attributes.js.old dist/operations-and-attributes.js)\",\n \"build\": \"yarn build-debug && webpack --mode=production\",\n \"build-debug\": \"webpack --mode=development && node scripts/generate-types.mjs\",\n \"clean\": \"rm -f dist/ohm.js dist/ohm.min.js\",\n \"lint\": \"eslint . --ignore-path ../.eslintignore\",\n \"format\": \"prettier . --write --ignore-path ../.prettierignore --config ../.prettierrc && eslint . --ignore-path ../.eslintignore --fix\",\n \"test\": \"ava && ava --config ava-ts.config.js test/test-typings.ts\",\n \"test-watch\": \"ava --watch\",\n \"pre-commit\": \"yarn run lint && yarn run build && yarn run test\",\n \"prepack\": \"cp ../../README.md . && yarn build\",\n \"postpack\": \"rm README.md\",\n \"unsafe-bootstrap\": \"bash scripts/bootstrap\",\n \"version-package\": \"bash scripts/version\",\n \"watch\": \"webpack --mode=development --watch\"\n },\n \"license\": \"MIT\",\n \"author\": \"Alex Warth <alexwarth@gmail.com> (http://tinlizzie.org/~awarth)\",\n \"contributors\": [\n \"Patrick Dubroy <pdubroy@gmail.com>\",\n \"Meixian Li <lmeixian@gmail.com>\",\n \"Marko Röder <m.roeder@photon-software.de>\",\n \"Tony Garnock-Jones <tonygarnockjones@gmail.com>\",\n \"Saketh Kasibatla <sake.kasi@gmail.com>\",\n \"Lionel Landwerlin <llandwerlin@gmail.com>\",\n \"Ray Toal <rtoal@lmu.edu>\",\n \"Jason Merrill <jwmerrill@gmail.com>\",\n \"Yoshiki Ohshima <Yoshiki.Ohshima@acm.org>\",\n \"stagas <gstagas@gmail.com>\",\n \"Jonathan Edwards <JonathanMEdwards@gmail.com>\",\n \"Milan Lajtoš <milan.lajtos@me.com>\",\n \"Neil Jewers <njjewers@uwaterloo.ca>\",\n \"Mike Niebling <(none)>\",\n \"AngryPowman <angrypowman@qq.com>\",\n \"Leslie Ying <acetophore@users.noreply.github.com>\",\n \"Pierre Donias <pierre.donias@gmail.com>\",\n \"Justin Chase <justin.m.chase@gmail.com>\",\n \"Daniel Tomlinson <DanielTomlinson@me.com>\",\n \"Stan Rozenraukh <stan@stanistan.com>\",\n \"Stephan Seidt <stephan.seidt@gmail.com>\",\n \"Steve Phillips <steve@tryingtobeawesome.com>\",\n \"Szymon Kaliski <kaliskiszymon@gmail.com>\",\n \"Thomas Nyberg <tomnyberg@gmail.com>\",\n \"Casey Olson <casey.m.olson@gmail.com>\",\n \"Vse Mozhet Byt <vsemozhetbyt@gmail.com>\",\n \"Wil Chung <10446+iamwilhelm@users.noreply.github.com>\",\n \"Arthur Carabott <arthurc@gmail.com>\",\n \"abego <ub@abego-software.de>\",\n \"acslk <d_vd415@hotmail.com>\",\n \"codeZeilen <codeZeilen@users.noreply.github.com>\",\n \"owch <bowenrainyday@gmail.com>\",\n \"Luca Guzzon <luca.guzzon@gmail.com>\",\n \"sfinnie <scott.finnie@gmail.com>\"\n ],\n \"dependencies\": {},\n \"devDependencies\": {\n \"@ohm-js/cli\": \"^1.0.0\",\n \"ava\": \"^3.15.0\",\n \"ava-spec\": \"^1.1.1\",\n \"dedent\": \"^0.7.0\",\n \"eslint\": \"^7.9.0\",\n \"eslint-config-google\": \"^0.14.0\",\n \"eslint-plugin-ava\": \"^11.0.0\",\n \"eslint-plugin-camelcase-ohm\": \"^0.2.1\",\n \"eslint-plugin-no-extension-in-require\": \"^0.2.0\",\n \"husky\": \"^4.2.5\",\n \"jsdom\": \"^9.9.1\",\n \"json\": \"^9.0.6\",\n \"markscript\": \"^0.5.0\",\n \"node-static\": \"^0.7.11\",\n \"ohm-grammar-ecmascript\": \"^1.0.0\",\n \"parcel\": \"^2.0.0\",\n \"ts-loader\": \"^8.0.4\",\n \"ts-node\": \"^9.0.0\",\n \"typescript\": \"^4.0.3\",\n \"walk-sync\": \"^2.2.0\",\n \"webpack\": \"^4.44.2\",\n \"webpack-cli\": \"^3.3.12\"\n },\n \"engines\": {\n \"node\": \">=0.12.1\"\n },\n \"targets\": {\n \"default\": {\n \"context\": \"browser\",\n \"source\": \"src/main.js\",\n \"distDir\": \"dist\"\n }\n }\n}\n","/* global __GLOBAL_OHM_VERSION__ */\n\n'use strict';\n\n// When running under Node, read the version from package.json. For the browser,\n// use a special global variable defined in the build process (see webpack.config.js).\nmodule.exports =\n typeof __GLOBAL_OHM_VERSION__ === 'string' ?\n __GLOBAL_OHM_VERSION__ :\n require('../package.json').version;\n","'use strict';\n\nmodule.exports = {\n VisitorFamily: require('./VisitorFamily'),\n semanticsForToAST: require('./semantics-toAST').semantics,\n toAST: require('./semantics-toAST').helper,\n};\n","'use strict';\n\n// --------------------------------------------------------------------\n// Imports\n// --------------------------------------------------------------------\n\nconst {assert} = require('../src/common');\n\n// --------------------------------------------------------------------\n// Private stuff\n// --------------------------------------------------------------------\n\n// Helpers\n\nfunction getProp(name, thing, fn) {\n return fn(thing[name]);\n}\n\nfunction mapProp(name, thing, fn) {\n return thing[name].map(fn);\n}\n\n// Returns a function that will walk a single property of a node.\n// `descriptor` is a string indicating the property name, optionally ending\n// with '[]' (e.g., 'children[]').\nfunction getPropWalkFn(descriptor) {\n const parts = descriptor.split(/ ?\\[\\]/);\n if (parts.length === 2) {\n return mapProp.bind(null, parts[0]);\n }\n return getProp.bind(null, descriptor);\n}\n\nfunction getProps(walkFns, thing, fn) {\n return walkFns.map(walkFn => walkFn(thing, fn));\n}\n\nfunction getWalkFn(shape) {\n if (typeof shape === 'string') {\n return getProps.bind(null, [getPropWalkFn(shape)]);\n } else if (Array.isArray(shape)) {\n return getProps.bind(null, shape.map(getPropWalkFn));\n } else {\n assert(typeof shape === 'function', 'Expected a string, Array, or function');\n assert(shape.length === 2, 'Expected a function of arity 2, got ' + shape.length);\n return shape;\n }\n}\n\nfunction isRestrictedIdentifier(str) {\n return /^[a-zA-Z_][0-9a-zA-Z_]*$/.test(str);\n}\n\nfunction trim(s) {\n return s.trim();\n}\n\nfunction parseSignature(sig) {\n const parts = sig.split(/[()]/).map(trim);\n if (parts.length === 3 && parts[2] === '') {\n const name = parts[0];\n let params = [];\n if (parts[1].length > 0) {\n params = parts[1].split(',').map(trim);\n }\n if (isRestrictedIdentifier(name) && params.every(isRestrictedIdentifier)) {\n return {name, formals: params};\n }\n }\n throw new Error('Invalid operation signature: ' + sig);\n}\n\n/*\n A VisitorFamily contains a set of recursive operations that are defined over some kind of\n tree structure. The `config` parameter specifies how to walk the tree:\n - 'getTag' is function which, given a node in the tree, returns the node's 'tag' (type)\n - 'shapes' an object that maps from a tag to a value that describes how to recursively\n evaluate the operation for nodes of that type. The value can be:\n * a string indicating the property name that holds that node's only child\n * an Array of property names (or an empty array indicating a leaf type), or\n * a function taking two arguments (node, fn), and returning an Array which is the result\n of apply `fn` to each of the node's children.\n */\nfunction VisitorFamily(config) {\n this._shapes = config.shapes;\n this._getTag = config.getTag;\n\n this.Adapter = function(thing, family) {\n this._adaptee = thing;\n this._family = family;\n };\n this.Adapter.prototype.valueOf = function() {\n throw new Error('heeey!');\n };\n this.operations = {};\n\n this._arities = Object.create(null);\n this._getChildren = Object.create(null);\n\n Object.keys(this._shapes).forEach(k => {\n const shape = this._shapes[k];\n this._getChildren[k] = getWalkFn(shape);\n\n // A function means the arity isn't fixed, so don't put an entry in the arity map.\n if (typeof shape !== 'function') {\n this._arities[k] = Array.isArray(shape) ? shape.length : 1;\n }\n });\n this._wrap = thing => new this.Adapter(thing, this);\n}\n\nVisitorFamily.prototype.wrap = function(thing) {\n return this._wrap(thing);\n};\n\nVisitorFamily.prototype._checkActionDict = function(dict) {\n Object.keys(dict).forEach(k => {\n assert(k in this._getChildren, \"Unrecognized action name '\" + k + \"'\");\n const action = dict[k];\n assert(typeof action === 'function', \"Key '\" + k + \"': expected function, got \" + action);\n if (k in this._arities) {\n const expected = this._arities[k];\n const actual = dict[k].length;\n assert(\n actual === expected,\n \"Action '\" + k + \"' has the wrong arity: expected \" + expected + ', got ' + actual\n );\n }\n });\n};\n\nVisitorFamily.prototype.addOperation = function(signature, actions) {\n const sig = parseSignature(signature);\n const {name} = sig;\n this._checkActionDict(actions);\n this.operations[name] = {\n name,\n formals: sig.formals,\n actions,\n };\n\n const family = this;\n this.Adapter.prototype[name] = function(...args) {\n const tag = family._getTag(this._adaptee);\n assert(tag in family._getChildren, \"getTag returned unrecognized tag '\" + tag + \"'\");\n assert(tag in actions, \"No action for '\" + tag + \"' in operation '\" + name + \"'\");\n\n // Create an \"arguments object\" from the arguments that were passed to this\n // operation / attribute.\n const argsObj = Object.create(null);\n for (const [i, val] of Object.entries(args)) {\n argsObj[sig.formals[i]] = val;\n }\n\n const oldArgs = this.args;\n this.args = argsObj;\n const ans = actions[tag].apply(\n this,\n family._getChildren[tag](this._adaptee, family._wrap)\n );\n this.args = oldArgs;\n return ans;\n };\n return this;\n};\n\n// --------------------------------------------------------------------\n// Exports\n// --------------------------------------------------------------------\n\nmodule.exports = VisitorFamily;\n","'use strict';\n\n// --------------------------------------------------------------------\n// Imports\n// --------------------------------------------------------------------\n\nconst pexprs = require('../src/pexprs');\nconst MatchResult = require('../src/MatchResult');\nconst Grammar = require('../src/Grammar');\n\n// --------------------------------------------------------------------\n// Operations\n// --------------------------------------------------------------------\n\nconst defaultOperation = {\n _terminal() {\n return this.sourceString;\n },\n\n _nonterminal(...children) {\n const {ctorName} = this._node;\n const {mapping} = this.args;\n\n // without customization\n if (!Object.prototype.hasOwnProperty.call(mapping, ctorName)) {\n // intermediate node\n if (this._node instanceof pexprs.Alt || this._node instanceof pexprs.Apply) {\n return children[0].toAST(mapping);\n }\n\n // lexical rule\n if (this.isLexical()) {\n return this.sourceString;\n }\n\n // singular node (e.g. only surrounded by literals or lookaheads)\n const realChildren = children.filter(child => !child.isTerminal());\n if (realChildren.length === 1) {\n return realChildren[0].toAST(mapping);\n }\n\n // rest: terms with multiple children\n }\n\n // direct forward\n if (typeof mapping[ctorName] === 'number') {\n return children[mapping[ctorName]].toAST(mapping);\n }\n\n // named/mapped children or unnamed children ('0', '1', '2', ...)\n const propMap = mapping[ctorName] || children;\n const node = {\n type: ctorName,\n };\n // eslint-disable-next-line guard-for-in\n for (const prop in propMap) {\n const mappedProp = mapping[ctorName] && mapping[ctorName][prop];\n if (typeof mappedProp === 'number') {\n // direct forward\n node[prop] = children[mappedProp].toAST(mapping);\n } else if (\n typeof mappedProp === 'string' ||\n typeof mappedProp === 'boolean' ||\n mappedProp === null\n ) {\n // primitive value\n node[prop] = mappedProp;\n } else if (typeof mappedProp === 'object' && mappedProp instanceof Number) {\n // primitive number (must be unboxed)\n node[prop] = Number(mappedProp);\n } else if (typeof mappedProp === 'function') {\n // computed value\n node[prop] = mappedProp.call(this, children);\n } else if (mappedProp === undefined) {\n if (children[prop] && !children[prop].isTerminal()) {\n node[prop] = children[prop].toAST(mapping);\n } else {\n // delete predefined 'type' properties, like 'type', if explicitely removed\n delete node[prop];\n }\n }\n }\n return node;\n },\n\n _iter(...children) {\n if (this._node.isOptional()) {\n if (this.numChildren === 0) {\n return null;\n } else {\n return children[0].toAST(this.args.mapping);\n }\n }\n\n return children.map(function(child) {\n return child.toAST(this.args.mapping);\n }, this);\n },\n\n NonemptyListOf(first, sep, rest) {\n return [first.toAST(this.args.mapping)].concat(rest.toAST(this.args.mapping));\n },\n\n EmptyListOf() {\n return [];\n },\n};\n\n// Returns a plain JavaScript object that includes an abstract syntax tree (AST)\n// for the given match result `res` containg a concrete syntax tree (CST) and grammar.\n// The optional `mapping` parameter can be used to customize how the nodes of the CST\n// are mapped to the AST (see /doc/extras.md#toastmatchresult-mapping).\nfunction toAST(res, mapping) {\n if (!(res instanceof MatchResult) || res.failed()) {\n throw new Error('toAST() expects a succesfull MatchResult as first parameter');\n }\n\n mapping = Object.assign({}, mapping);\n const operation = Object.assign({}, defaultOperation);\n for (const termName in mapping) {\n if (typeof mapping[termName] === 'function') {\n operation[termName] = mapping[termName];\n delete mapping[termName];\n }\n }\n const g = res._cst.grammar;\n const s = g.createSemantics().addOperation('toAST(mapping)', operation);\n return s(res).toAST(mapping);\n}\n\n// Returns a semantics containg the toAST(mapping) operation for the given grammar g.\nfunction semanticsForToAST(g) {\n if (!(g instanceof Grammar)) {\n throw new Error('semanticsToAST() expects a Grammar as parameter');\n }\n\n return g.createSemantics().addOperation('toAST(mapping)', defaultOperation);\n}\n\nmodule.exports = {\n helper: toAST,\n semantics: semanticsForToAST,\n};\n","var ohm = require('..');\nmodule.exports = ohm.makeRecipe([\"grammar\",{\"source\":\"BuiltInRules {\\n\\n alnum (an alpha-numeric character)\\n = letter\\n | digit\\n\\n letter (a letter)\\n = lower\\n | upper\\n | unicodeLtmo\\n\\n digit (a digit)\\n = \\\"0\\\"..\\\"9\\\"\\n\\n hexDigit (a hexadecimal digit)\\n = digit\\n | \\\"a\\\"..\\\"f\\\"\\n | \\\"A\\\"..\\\"F\\\"\\n\\n ListOf<elem, sep>\\n = NonemptyListOf<elem, sep>\\n | EmptyListOf<elem, sep>\\n\\n NonemptyListOf<elem, sep>\\n = elem (sep elem)*\\n\\n EmptyListOf<elem, sep>\\n = /* nothing */\\n\\n listOf<elem, sep>\\n = nonemptyListOf<elem, sep>\\n | emptyListOf<elem, sep>\\n\\n nonemptyListOf<elem, sep>\\n = elem (sep elem)*\\n\\n emptyListOf<elem, sep>\\n = /* nothing */\\n\\n // Allows a syntactic rule application within a lexical context.\\n experimentalApplySyntactic<app> = app\\n}\"},\"BuiltInRules\",null,null,{\"alnum\":[\"define\",{\"sourceInterval\":[18,78]},\"an alpha-numeric character\",[],[\"alt\",{\"sourceInterval\":[60,78]},[\"app\",{\"sourceInterval\":[60,66]},\"letter\",[]],[\"app\",{\"sourceInterval\":[73,78]},\"digit\",[]]]],\"letter\":[\"define\",{\"sourceInterval\":[82,142]},\"a letter\",[],[\"alt\",{\"sourceInterval\":[107,142]},[\"app\",{\"sourceInterval\":[107,112]},\"lower\",[]],[\"app\",{\"sourceInterval\":[119,124]},\"upper\",[]],[\"app\",{\"sourceInterval\":[131,142]},\"unicodeLtmo\",[]]]],\"digit\":[\"define\",{\"sourceInterval\":[146,177]},\"a digit\",[],[\"range\",{\"sourceInterval\":[169,177]},\"0\",\"9\"]],\"hexDigit\":[\"define\",{\"sourceInterval\":[181,254]},\"a hexadecimal digit\",[],[\"alt\",{\"sourceInterval\":[219,254]},[\"app\",{\"sourceInterval\":[219,224]},\"digit\",[]],[\"range\",{\"sourceInterval\":[231,239]},\"a\",\"f\"],[\"range\",{\"sourceInterval\":[246,254]},\"A\",\"F\"]]],\"ListOf\":[\"define\",{\"sourceInterval\":[258,336]},null,[\"elem\",\"sep\"],[\"alt\",{\"sourceInterval\":[282,336]},[\"app\",{\"sourceInterval\":[282,307]},\"NonemptyListOf\",[[\"param\",{\"sourceInterval\":[297,301]},0],[\"param\",{\"sourceInterval\":[303,306]},1]]],[\"app\",{\"sourceInterval\":[314,336]},\"EmptyListOf\",[[\"param\",{\"sourceInterval\":[326,330]},0],[\"param\",{\"sourceInterval\":[332,335]},1]]]]],\"NonemptyListOf\":[\"define\",{\"sourceInterval\":[340,388]},null,[\"elem\",\"sep\"],[\"seq\",{\"sourceInterval\":[372,388]},[\"param\",{\"sourceInterval\":[372,376]},0],[\"star\",{\"sourceInterval\":[377,388]},[\"seq\",{\"sourceInterval\":[378,386]},[\"param\",{\"sourceInterval\":[378,381]},1],[\"param\",{\"sourceInterval\":[382,386]},0]]]]],\"EmptyListOf\":[\"define\",{\"sourceInterval\":[392,434]},null,[\"elem\",\"sep\"],[\"seq\",{\"sourceInterval\":[438,438]}]],\"listOf\":[\"define\",{\"sourceInterval\":[438,516]},null,[\"elem\",\"sep\"],[\"alt\",{\"sourceInterval\":[462,516]},[\"app\",{\"sourceInterval\":[462,487]},\"nonemptyListOf\",[[\"param\",{\"sourceInterval\":[477,481]},0],[\"param\",{\"sourceInterval\":[483,486]},1]]],[\"app\",{\"sourceInterval\":[494,516]},\"emptyListOf\",[[\"param\",{\"sourceInterval\":[506,510]},0],[\"param\",{\"sourceInterval\":[512,515]},1]]]]],\"nonemptyListOf\":[\"define\",{\"sourceInterval\":[520,568]},null,[\"elem\",\"sep\"],[\"seq\",{\"sourceInterval\":[552,568]},[\"param\",{\"sourceInterval\":[552,556]},0],[\"star\",{\"sourceInterval\":[557,568]},[\"seq\",{\"sourceInterval\":[558,566]},[\"param\",{\"sourceInterval\":[558,561]},1],[\"param\",{\"sourceInterval\":[562,566]},0]]]]],\"emptyListOf\":[\"define\",{\"sourceInterval\":[572,682]},null,[\"elem\",\"sep\"],[\"seq\",{\"sourceInterval\":[685,685]}]],\"experimentalApplySyntactic\":[\"define\",{\"sourceInterval\":[685,722]},null,[\"app\"],[\"param\",{\"sourceInterval\":[719,722]},0]]}]);\n","var ohm = require('..');\nmodule.exports = ohm.makeRecipe([\"grammar\",{\"source\":\"Ohm {\\n\\n Grammars\\n = Grammar*\\n\\n Grammar\\n = ident SuperGrammar? \\\"{\\\" Rule* \\\"}\\\"\\n\\n SuperGrammar\\n = \\\"<:\\\" ident\\n\\n Rule\\n = ident Formals? ruleDescr? \\\"=\\\" RuleBody -- define\\n | ident Formals? \\\":=\\\" OverrideRuleBody -- override\\n | ident Formals? \\\"+=\\\" RuleBody -- extend\\n\\n RuleBody\\n = \\\"|\\\"? NonemptyListOf<TopLevelTerm, \\\"|\\\">\\n\\n TopLevelTerm\\n = Seq caseName -- inline\\n | Seq\\n\\n OverrideRuleBody\\n = \\\"|\\\"? NonemptyListOf<OverrideTopLevelTerm, \\\"|\\\">\\n\\n OverrideTopLevelTerm\\n = \\\"...\\\" -- superSplice\\n | TopLevelTerm\\n\\n Formals\\n = \\\"<\\\" ListOf<ident, \\\",\\\"> \\\">\\\"\\n\\n Params\\n = \\\"<\\\" ListOf<Seq, \\\",\\\"> \\\">\\\"\\n\\n Alt\\n = NonemptyListOf<Seq, \\\"|\\\">\\n\\n Seq\\n = Iter*\\n\\n Iter\\n = Pred \\\"*\\\" -- star\\n | Pred \\\"+\\\" -- plus\\n | Pred \\\"?\\\" -- opt\\n | Pred\\n\\n Pred\\n = \\\"~\\\" Lex -- not\\n | \\\"&\\\" Lex -- lookahead\\n | Lex\\n\\n Lex\\n = \\\"#\\\" Base -- lex\\n | Base\\n\\n Base\\n = ident Params? ~(ruleDescr? \\\"=\\\" | \\\":=\\\" | \\\"+=\\\") -- application\\n | oneCharTerminal \\\"..\\\" oneCharTerminal -- range\\n | terminal -- terminal\\n | \\\"(\\\" Alt \\\")\\\" -- paren\\n\\n ruleDescr (a rule description)\\n = \\\"(\\\" ruleDescrText \\\")\\\"\\n\\n ruleDescrText\\n = (~\\\")\\\" any)*\\n\\n caseName\\n = \\\"--\\\" (~\\\"\\\\n\\\" space)* name (~\\\"\\\\n\\\" space)* (\\\"\\\\n\\\" | &\\\"}\\\")\\n\\n name (a name)\\n = nameFirst nameRest*\\n\\n nameFirst\\n = \\\"_\\\"\\n | letter\\n\\n nameRest\\n = \\\"_\\\"\\n | alnum\\n\\n ident (an identifier)\\n = name\\n\\n terminal\\n = \\\"\\\\\\\"\\\" terminalChar* \\\"\\\\\\\"\\\"\\n\\n oneCharTerminal\\n = \\\"\\\\\\\"\\\" terminalChar \\\"\\\\\\\"\\\"\\n\\n terminalChar\\n = escapeChar\\n | ~\\\"\\\\\\\\\\\" ~\\\"\\\\\\\"\\\" ~\\\"\\\\n\\\" any\\n\\n escapeChar (an escape sequence)\\n = \\\"\\\\\\\\\\\\\\\\\\\" -- backslash\\n | \\\"\\\\\\\\\\\\\\\"\\\" -- doubleQuote\\n | \\\"\\\\\\\\\\\\'\\\" -- singleQuote\\n | \\\"\\\\\\\\b\\\" -- backspace\\n | \\\"\\\\\\\\n\\\" -- lineFeed\\n | \\\"\\\\\\\\r\\\" -- carriageReturn\\n | \\\"\\\\\\\\t\\\" -- tab\\n | \\\"\\\\\\\\u\\\" hexDigit hexDigit hexDigit hexDigit -- unicodeEscape\\n | \\\"\\\\\\\\x\\\" hexDigit hexDigit -- hexEscape\\n\\n space\\n += comment\\n\\n comment\\n = \\\"//\\\" (~\\\"\\\\n\\\" any)* &(\\\"\\\\n\\\" | end) -- singleLine\\n | \\\"/*\\\" (~\\\"*/\\\" any)* \\\"*/\\\" -- multiLine\\n\\n tokens = token*\\n\\n token = caseName | comment | ident | operator | punctuation | terminal | any\\n\\n operator = \\\"<:\\\" | \\\"=\\\" | \\\":=\\\" | \\\"+=\\\" | \\\"*\\\" | \\\"+\\\" | \\\"?\\\" | \\\"~\\\" | \\\"&\\\"\\n\\n punctuation = \\\"<\\\" | \\\">\\\" | \\\",\\\" | \\\"--\\\"\\n}\"},\"Ohm\",null,\"Grammars\",{\"Grammars\":[\"define\",{\"sourceInterval\":[9,32]},null,[],[\"star\",{\"sourceInterval\":[24,32]},[\"app\",{\"sourceInterval\":[24,31]},\"Grammar\",[]]]],\"Grammar\":[\"define\",{\"sourceInterval\":[36,83]},null,[],[\"seq\",{\"sourceInterval\":[50,83]},[\"app\",{\"sourceInterval\":[50,55]},\"ident\",[]],[\"opt\",{\"sourceInterval\":[56,69]},[\"app\",{\"sourceInterval\":[56,68]},\"SuperGrammar\",[]]],[\"terminal\",{\"sourceInterval\":[70,73]},\"{\"],[\"star\",{\"sourceInterval\":[74,79]},[\"app\",{\"sourceInterval\":[74,78]},\"Rule\",[]]],[\"terminal\",{\"sourceInterval\":[80,83]},\"}\"]]],\"SuperGrammar\":[\"define\",{\"sourceInterval\":[87,116]},null,[],[\"seq\",{\"sourceInterval\":[106,116]},[\"terminal\",{\"sourceInterval\":[106,110]},\"<:\"],[\"app\",{\"sourceInterval\":[111,116]},\"ident\",[]]]],\"Rule_define\":[\"define\",{\"sourceInterval\":[131,181]},null,[],[\"seq\",{\"sourceInterval\":[131,170]},[\"app\",{\"sourceInterval\":[131,136]},\"ident\",[]],[\"opt\",{\"sourceInterval\":[137,145]},[\"app\",{\"sourceInterval\":[137,144]},\"Formals\",[]]],[\"opt\",{\"sourceInterval\":[146,156]},[\"app\",{\"sourceInterval\":[146,155]},\"ruleDescr\",[]]],[\"terminal\",{\"sourceInterval\":[157,160]},\"=\"],[\"app\",{\"sourceInterval\":[162,170]},\"RuleBody\",[]]]],\"Rule_override\":[\"define\",{\"sourceInterval\":[188,248]},null,[],[\"seq\",{\"sourceInterval\":[188,235]},[\"app\",{\"sourceInterval\":[188,193]},\"ident\",[]],[\"opt\",{\"sourceInterval\":[194,202]},[\"app\",{\"sourceInterval\":[194,201]},\"Formals\",[]]],[\"terminal\",{\"sourceInterval\":[214,218]},\":=\"],[\"app\",{\"sourceInterval\":[219,235]},\"OverrideRuleBody\",[]]]],\"Rule_extend\":[\"define\",{\"sourceInterval\":[255,305]},null,[],[\"seq\",{\"sourceInterval\":[255,294]},[\"app\",{\"sourceInterval\":[255,260]},\"ident\",[]],[\"opt\",{\"sourceInterval\":[261,269]},[\"app\",{\"sourceInterval\":[261,268]},\"Formals\",[]]],[\"terminal\",{\"sourceInterval\":[281,285]},\"+=\"],[\"app\",{\"sourceInterval\":[286,294]},\"RuleBody\",[]]]],\"Rule\":[\"define\",{\"sourceInterval\":[120,305]},null,[],[\"alt\",{\"sourceInterval\":[131,305]},[\"app\",{\"sourceInterval\":[131,170]},\"Rule_define\",[]],[\"app\",{\"sourceInterval\":[188,235]},\"Rule_override\",[]],[\"app\",{\"sourceInterval\":[255,294]},\"Rule_extend\",[]]]],\"RuleBody\":[\"define\",{\"sourceInterval\":[309,362]},null,[],[\"seq\",{\"sourceInterval\":[324,362]},[\"opt\",{\"sourceInterval\":[324,328]},[\"terminal\",{\"sourceInterval\":[324,327]},\"|\"]],[\"app\",{\"sourceInterval\":[329,362]},\"NonemptyListOf\",[[\"app\",{\"sourceInterval\":[344,356]},\"TopLevelTerm\",[]],[\"terminal\",{\"sourceInterval\":[358,361]},\"|\"]]]]],\"TopLevelTerm_inline\":[\"define\",{\"sourceInterval\":[385,408]},null,[],[\"seq\",{\"sourceInterval\":[385,397]},[\"app\",{\"sourceInterval\":[385,388]},\"Seq\",[]],[\"app\",{\"sourceInterval\":[389,397]},\"caseName\",[]]]],\"TopLevelTerm\":[\"define\",{\"sourceInterval\":[366,418]},null,[],[\"alt\",{\"sourceInterval\":[385,418]},[\"app\",{\"sourceInterval\":[385,397]},\"TopLevelTerm_inline\",[]],[\"app\",{\"sourceInterval\":[415,418]},\"Seq\",[]]]],\"OverrideRuleBody\":[\"define\",{\"sourceInterval\":[422,491]},null,[],[\"seq\",{\"sourceInterval\":[445,491]},[\"opt\",{\"sourceInterval\":[445,449]},[\"terminal\",{\"sourceInterval\":[445,448]},\"|\"]],[\"app\",{\"sourceInterval\":[450,491]},\"NonemptyListOf\",[[\"app\",{\"sourceInterval\":[465,485]},\"OverrideTopLevelTerm\",[]],[\"terminal\",{\"sourceInterval\":[487,490]},\"|\"]]]]],\"OverrideTopLevelTerm_superSplice\":[\"define\",{\"sourceInterval\":[522,543]},null,[],[\"terminal\",{\"sourceInterval\":[522,527]},\"...\"]],\"OverrideTopLevelTerm\":[\"define\",{\"sourceInterval\":[495,562]},null,[],[\"alt\",{\"sourceInterval\":[522,562]},[\"app\",{\"sourceInterval\":[522,527]},\"OverrideTopLevelTerm_superSplice\",[]],[\"app\",{\"sourceInterval\":[550,562]},\"TopLevelTerm\",[]]]],\"Formals\":[\"define\",{\"sourceInterval\":[566,606]},null,[],[\"seq\",{\"sourceInterval\":[580,606]},[\"terminal\",{\"sourceInterval\":[580,583]},\"<\"],[\"app\",{\"sourceInterval\":[584,602]},\"ListOf\",[[\"app\",{\"sourceInterval\":[591,596]},\"ident\",[]],[\"terminal\",{\"sourceInterval\":[598,601]},\",\"]]],[\"terminal\",{\"sourceInterval\":[603,606]},\">\"]]],\"Params\":[\"define\",{\"sourceInterval\":[610,647]},null,[],[\"seq\",{\"sourceInterval\":[623,647]},[\"terminal\",{\"sourceInterval\":[623,626]},\"<\"],[\"app\",{\"sourceInterval\":[627,643]},\"ListOf\",[[\"app\",{\"sourceInterval\":[634,637]},\"Seq\",[]],[\"terminal\",{\"sourceInterval\":[639,642]},\",\"]]],[\"terminal\",{\"sourceInterval\":[644,647]},\">\"]]],\"Alt\":[\"define\",{\"sourceInterval\":[651,685]},null,[],[\"app\",{\"sourceInterval\":[661,685]},\"NonemptyListOf\",[[\"app\",{\"sourceInterval\":[676,679]},\"Seq\",[]],[\"terminal\",{\"sourceInterval\":[681,684]},\"|\"]]]],\"Seq\":[\"define\",{\"sourceInterval\":[689,704]},null,[],[\"star\",{\"sourceInterval\":[699,704]},[\"app\",{\"sourceInterval\":[699,703]},\"Iter\",[]]]],\"Iter_star\":[\"define\",{\"sourceInterval\":[719,736]},null,[],[\"seq\",{\"sourceInterval\":[719,727]},[\"app\",{\"sourceInterval\":[719,723]},\"Pred\",[]],[\"terminal\",{\"sourceInterval\":[724,727]},\"*\"]]],\"Iter_plus\":[\"define\",{\"sourceInterval\":[743,760]},null,[],[\"seq\",{\"sourceInterval\":[743,751]},[\"app\",{\"sourceInterval\":[743,747]},\"Pred\",[]],[\"terminal\",{\"sourceInterval\":[748,751]},\"+\"]]],\"Iter_opt\":[\"define\",{\"sourceInterval\":[767,783]},null,[],[\"seq\",{\"sourceInterval\":[767,775]},[\"app\",{\"sourceInterval\":[767,771]},\"Pred\",[]],[\"terminal\",{\"sourceInterval\":[772,775]},\"?\"]]],\"Iter\":[\"define\",{\"sourceInterval\":[708,794]},null,[],[\"alt\",{\"sourceInterval\":[719,794]},[\"app\",{\"sourceInterval\":[719,727]},\"Iter_star\",[]],[\"app\",{\"sourceInterval\":[743,751]},\"Iter_plus\",[]],[\"app\",{\"sourceInterval\":[767,775]},\"Iter_opt\",[]],[\"app\",{\"sourceInterval\":[790,794]},\"Pred\",[]]]],\"Pred_not\":[\"define\",{\"sourceInterval\":[809,824]},null,[],[\"seq\",{\"sourceInterval\":[809,816]},[\"terminal\",{\"sourceInterval\":[809,812]},\"~\"],[\"app\",{\"sourceInterval\":[813,816]},\"Lex\",[]]]],\"Pred_lookahead\":[\"define\",{\"sourceInterval\":[831,852]},null,[],[\"seq\",{\"sourceInterval\":[831,838]},[\"terminal\",{\"sourceInterval\":[831,834]},\"&\"],[\"app\",{\"sourceInterval\":[835,838]},\"Lex\",[]]]],\"Pred\":[\"define\",{\"sourceInterval\":[798,862]},null,[],[\"alt\",{\"sourceInterval\":[809,862]},[\"app\",{\"sourceInterval\":[809,816]},\"Pred_not\",[]],[\"app\",{\"sourceInterval\":[831,838]},\"Pred_lookahead\",[]],[\"app\",{\"sourceInterval\":[859,862]},\"Lex\",[]]]],\"Lex_lex\":[\"define\",{\"sourceInterval\":[876,892]},null,[],[\"seq\",{\"sourceInterval\":[876,884]},[\"terminal\",{\"sourceInterval\":[876,879]},\"#\"],[\"app\",{\"sourceInterval\":[880,884]},\"Base\",[]]]],\"Lex\":[\"define\",{\"sourceInterval\":[866,903]},null,[],[\"alt\",{\"sourceInterval\":[876,903]},[\"app\",{\"sourceInterval\":[876,884]},\"Lex_lex\",[]],[\"app\",{\"sourceInterval\":[899,903]},\"Base\",[]]]],\"Base_application\":[\"define\",{\"sourceInterval\":[918,979]},null,[],[\"seq\",{\"sourceInterval\":[918,963]},[\"app\",{\"sourceInterval\":[918,923]},\"ident\",[]],[\"opt\",{\"sourceInterval\":[924,931]},[\"app\",{\"sourceInterval\":[924,930]},\"Params\",[]]],[\"not\",{\"sourceInterval\":[932,963]},[\"alt\",{\"sourceInterval\":[934,962]},[\"seq\",{\"sourceInterval\":[934,948]},[\"opt\",{\"sourceInterval\":[934,944]},[\"app\",{\"sourceInterval\":[934,943]},\"ruleDescr\",[]]],[\"terminal\",{\"sourceInterval\":[945,948]},\"=\"]],[\"terminal\",{\"sourceInterval\":[951,955]},\":=\"],[\"terminal\",{\"sourceInterval\":[958,962]},\"+=\"]]]]],\"Base_range\":[\"define\",{\"sourceInterval\":[986,1041]},null,[],[\"seq\",{\"sourceInterval\":[986,1022]},[\"app\",{\"sourceInterval\":[986,1001]},\"oneCharTerminal\",[]],[\"terminal\",{\"sourceInterval\":[1002,1006]},\"..\"],[\"app\",{\"sourceInterval\":[1007,1022]},\"oneCharTerminal\",[]]]],\"Base_terminal\":[\"define\",{\"sourceInterval\":[1048,1106]},null,[],[\"app\",{\"sourceInterval\":[1048,1056]},\"terminal\",[]]],\"Base_paren\":[\"define\",{\"sourceInterval\":[1113,1168]},null,[],[\"seq\",{\"sourceInterval\":[1113,1124]},[\"terminal\",{\"sourceInterval\":[1113,1116]},\"(\"],[\"app\",{\"sourceInterval\":[1117,1120]},\"Alt\",[]],[\"terminal\",{\"sourceInterval\":[1121,1124]},\")\"]]],\"Base\":[\"define\",{\"sourceInterval\":[907,1168]},null,[],[\"alt\",{\"sourceInterval\":[918,1168]},[\"app\",{\"sourceInterval\":[918,963]},\"Base_application\",[]],[\"app\",{\"sourceInterval\":[986,1022]},\"Base_range\",[]],[\"app\",{\"sourceInterval\":[1048,1056]},\"Base_terminal\",[]],[\"app\",{\"sourceInterval\":[1113,1124]},\"Base_paren\",[]]]],\"ruleDescr\":[\"define\",{\"sourceInterval\":[1172,1231]},\"a rule description\",[],[\"seq\",{\"sourceInterval\":[1210,1231]},[\"terminal\",{\"sourceInterval\":[1210,1213]},\"(\"],[\"app\",{\"sourceInterval\":[1214,1227]},\"ruleDescrText\",[]],[\"terminal\",{\"sourceInterval\":[1228,1231]},\")\"]]],\"ruleDescrText\":[\"define\",{\"sourceInterval\":[1235,1266]},null,[],[\"star\",{\"sourceInterval\":[1255,1266]},[\"seq\",{\"sourceInterval\":[1256,1264]},[\"not\",{\"sourceInterval\":[1256,1260]},[\"terminal\",{\"sourceInterval\":[1257,1260]},\")\"]],[\"app\",{\"sourceInterval\":[1261,1264]},\"any\",[]]]]],\"caseName\":[\"define\",{\"sourceInterval\":[1270,1338]},null,[],[\"seq\",{\"sourceInterval\":[1285,1338]},[\"terminal\",{\"sourceInterval\":[1285,1289]},\"--\"],[\"star\",{\"sourceInterval\":[1290,1304]},[\"seq\",{\"sourceInterval\":[1291,1302]},[\"not\",{\"sourceInterval\":[1291,1296]},[\"terminal\",{\"sourceInterval\":[1292,1296]},\"\\n\"]],[\"app\",{\"sourceInterval\":[1297,1302]},\"space\",[]]]],[\"app\",{\"sourceInterval\":[1305,1309]},\"name\",[]],[\"star\",{\"sourceInterval\":[1310,1324]},[\"seq\",{\"sourceInterval\":[1311,1322]},[\"not\",{\"sourceInterval\":[1311,1316]},[\"terminal\",{\"sourceInterval\":[1312,1316]},\"\\n\"]],[\"app\",{\"sourceInterval\":[1317,1322]},\"space\",[]]]],[\"alt\",{\"sourceInterval\":[1326,1337]},[\"terminal\",{\"sourceInterval\":[1326,1330]},\"\\n\"],[\"lookahead\",{\"sourceInterval\":[1333,1337]},[\"terminal\",{\"sourceInterval\":[1334,1337]},\"}\"]]]]],\"name\":[\"define\",{\"sourceInterval\":[1342,1382]},\"a name\",[],[\"seq\",{\"sourceInterval\":[1363,1382]},[\"app\",{\"sourceInterval\":[1363,1372]},\"nameFirst\",[]],[\"star\",{\"sourceInterval\":[1373,1382]},[\"app\",{\"sourceInterval\":[1373,1381]},\"nameRest\",[]]]]],\"nameFirst\":[\"define\",{\"sourceInterval\":[1386,1418]},null,[],[\"alt\",{\"sourceInterval\":[1402,1418]},[\"terminal\",{\"sourceInterval\":[1402,1405]},\"_\"],[\"app\",{\"sourceInterval\":[1412,1418]},\"letter\",[]]]],\"nameRest\":[\"define\",{\"sourceInterval\":[1422,1452]},null,[],[\"alt\",{\"sourceInterval\":[1437,1452]},[\"terminal\",{\"sourceInterval\":[1437,1440]},\"_\"],[\"app\",{\"sourceInterval\":[1447,1452]},\"alnum\",[]]]],\"ident\":[\"define\",{\"sourceInterval\":[1456,1489]},\"an identifier\",[],[\"app\",{\"sourceInterval\":[1485,1489]},\"name\",[]]],\"terminal\":[\"define\",{\"sourceInterval\":[1493,1531]},null,[],[\"seq\",{\"sourceInterval\":[1508,1531]},[\"terminal\",{\"sourceInterval\":[1508,1512]},\"\\\"\"],[\"star\",{\"sourceInterval\":[1513,1526]},[\"app\",{\"sourceInterval\":[1513,1525]},\"terminalChar\",[]]],[\"terminal\",{\"sourceInterval\":[1527,1531]},\"\\\"\"]]],\"oneCharTerminal\":[\"define\",{\"sourceInterval\":[1535,1579]},null,[],[\"seq\",{\"sourceInterval\":[1557,1579]},[\"terminal\",{\"sourceInterval\":[1557,1561]},\"\\\"\"],[\"app\",{\"sourceInterval\":[1562,1574]},\"terminalChar\",[]],[\"terminal\",{\"sourceInterval\":[1575,1579]},\"\\\"\"]]],\"terminalChar\":[\"define\",{\"sourceInterval\":[1583,1640]},null,[],[\"alt\",{\"sourceInterval\":[1602,1640]},[\"app\",{\"sourceInterval\":[1602,1612]},\"escapeChar\",[]],[\"seq\",{\"sourceInterval\":[1619,1640]},[\"not\",{\"sourceInterval\":[1619,1624]},[\"terminal\",{\"sourceInterval\":[1620,1624]},\"\\\\\"]],[\"not\",{\"sourceInterval\":[1625,1630]},[\"terminal\",{\"sourceInterval\":[1626,1630]},\"\\\"\"]],[\"not\",{\"sourceInterval\":[1631,1636]},[\"terminal\",{\"sourceInterval\":[1632,1636]},\"\\n\"]],[\"app\",{\"sourceInterval\":[1637,1640]},\"any\",[]]]]],\"escapeChar_backslash\":[\"define\",{\"sourceInterval\":[1683,1738]},null,[],[\"terminal\",{\"sourceInterval\":[1683,1689]},\"\\\\\\\\\"]],\"escapeChar_doubleQuote\":[\"define\",{\"sourceInterval\":[1745,1802]},null,[],[\"terminal\",{\"sourceInterval\":[1745,1751]},\"\\\\\\\"\"]],\"escapeChar_singleQuote\":[\"define\",{\"sourceInterval\":[1809,1866]},null,[],[\"terminal\",{\"sourceInterval\":[1809,1815]},\"\\\\'\"]],\"escapeChar_backspace\":[\"define\",{\"sourceInterval\":[1873,1928]},null,[],[\"terminal\",{\"sourceInterval\":[1873,1878]},\"\\\\b\"]],\"escapeChar_lineFeed\":[\"define\",{\"sourceInterval\":[1935,1989]},null,[],[\"terminal\",{\"sourceInterval\":[1935,1940]},\"\\\\n\"]],\"escapeChar_carriageReturn\":[\"define\",{\"sourceInterval\":[1996,2056]},null,[],[\"terminal\",{\"sourceInterval\":[1996,2001]},\"\\\\r\"]],\"escapeChar_tab\":[\"define\",{\"sourceInterval\":[2063,2112]},null,[],[\"terminal\",{\"sourceInterval\":[2063,2068]},\"\\\\t\"]],\"escapeChar_unicodeEscape\":[\"define\",{\"sourceInterval\":[2119,2178]},null,[],[\"seq\",{\"sourceInterval\":[2119,2160]},[\"terminal\",{\"sourceInterval\":[2119,2124]},\"\\\\u\"],[\"app\",{\"sourceInterval\":[2125,2133]},\"hexDigit\",[]],[\"app\",{\"sourceInterval\":[2134,2142]},\"hexDigit\",[]],[\"app\",{\"sourceInterval\":[2143,2151]},\"hexDigit\",[]],[\"app\",{\"sourceInterval\":[2152,2160]},\"hexDigit\",[]]]],\"escapeChar_hexEscape\":[\"define\",{\"sourceInterval\":[2185,2240]},null,[],[\"seq\",{\"sourceInterval\":[2185,2208]},[\"terminal\",{\"sourceInterval\":[2185,2190]},\"\\\\x\"],[\"app\",{\"sourceInterval\":[2191,2199]},\"hexDigit\",[]],[\"app\",{\"sourceInterval\":[2200,2208]},\"hexDigit\",[]]]],\"escapeChar\":[\"define\",{\"sourceInterval\":[1644,2240]},\"an escape sequence\",[],[\"alt\",{\"sourceInterval\":[1683,2240]},[\"app\",{\"sourceInterval\":[1683,1689]},\"escapeChar_backslash\",[]],[\"app\",{\"sourceInterval\":[1745,1751]},\"escapeChar_doubleQuote\",[]],[\"app\",{\"sourceInterval\":[1809,1815]},\"escapeChar_singleQuote\",[]],[\"app\",{\"sourceInterval\":[1873,1878]},\"escapeChar_backspace\",[]],[\"app\",{\"sourceInterval\":[1935,1940]},\"escapeChar_lineFeed\",[]],[\"app\",{\"sourceInterval\":[1996,2001]},\"escapeChar_carriageReturn\",[]],[\"app\",{\"sourceInterval\":[2063,2068]},\"escapeChar_tab\",[]],[\"app\",{\"sourceInterval\":[2119,2160]},\"escapeChar_unicodeEscape\",[]],[\"app\",{\"sourceInterval\":[2185,2208]},\"escapeChar_hexEscape\",[]]]],\"space\":[\"extend\",{\"sourceInterval\":[2244,2263]},null,[],[\"app\",{\"sourceInterval\":[2256,2263]},\"comment\",[]]],\"comment_singleLine\":[\"define\",{\"sourceInterval\":[2281,2327]},null,[],[\"seq\",{\"sourceInterval\":[2281,2312]},[\"terminal\",{\"sourceInterval\":[2281,2285]},\"//\"],[\"star\",{\"sourceInterval\":[2286,2298]},[\"seq\",{\"sourceInterval\":[2287,2296]},[\"not\",{\"sourceInterval\":[2287,2292]},[\"terminal\",{\"sourceInterval\":[2288,2292]},\"\\n\"]],[\"app\",{\"sourceInterval\":[2293,2296]},\"any\",[]]]],[\"lookahead\",{\"sourceInterval\":[2299,2312]},[\"alt\",{\"sourceInterval\":[2301,2311]},[\"terminal\",{\"sourceInterval\":[2301,2305]},\"\\n\"],[\"app\",{\"sourceInterval\":[2308,2311]},\"end\",[]]]]]],\"comment_multiLine\":[\"define\",{\"sourceInterval\":[2334,2370]},null,[],[\"seq\",{\"sourceInterval\":[2334,2356]},[\"terminal\",{\"sourceInterval\":[2334,2338]},\"/*\"],[\"star\",{\"sourceInterval\":[2339,2351]},[\"seq\",{\"sourceInterval\":[2340,2349]},[\"not\",{\"sourceInterval\":[2340,2345]},[\"terminal\",{\"sourceInterval\":[2341,2345]},\"*/\"]],[\"app\",{\"sourceInterval\":[2346,2349]},\"any\",[]]]],[\"terminal\",{\"sourceInterval\":[2352,2356]},\"*/\"]]],\"comment\":[\"define\",{\"sourceInterval\":[2267,2370]},null,[],[\"alt\",{\"sourceInterval\":[2281,2370]},[\"app\",{\"sourceInterval\":[2281,2312]},\"comment_singleLine\",[]],[\"app\",{\"sourceInterval\":[2334,2356]},\"comment_multiLine\",[]]]],\"tokens\":[\"define\",{\"sourceInterval\":[2374,2389]},null,[],[\"star\",{\"sourceInterval\":[2383,2389]},[\"app\",{\"sourceInterval\":[2383,2388]},\"token\",[]]]],\"token\":[\"define\",{\"sourceInterval\":[2393,2469]},null,[],[\"alt\",{\"sourceInterval\":[2401,2469]},[\"app\",{\"sourceInterval\":[2401,2409]},\"caseName\",[]],[\"app\",{\"sourceInterval\":[2412,2419]},\"comment\",[]],[\"app\",{\"sourceInterval\":[2422,2427]},\"ident\",[]],[\"app\",{\"sourceInterval\":[2430,2438]},\"operator\",[]],[\"app\",{\"sourceInterval\":[2441,2452]},\"punctuation\",[]],[\"app\",{\"sourceInterval\":[2455,2463]},\"terminal\",[]],[\"app\",{\"sourceInterval\":[2466,2469]},\"any\",[]]]],\"operator\":[\"define\",{\"sourceInterval\":[2473,2538]},null,[],[\"alt\",{\"sourceInterval\":[2484,2538]},[\"terminal\",{\"sourceInterval\":[2484,2488]},\"<:\"],[\"terminal\",{\"sourceInterval\":[2491,2494]},\"=\"],[\"terminal\",{\"sourceInterval\":[2497,2501]},\":=\"],[\"terminal\",{\"sourceInterval\":[2504,2508]},\"+=\"],[\"terminal\",{\"sourceInterval\":[2511,2514]},\"*\"],[\"terminal\",{\"sourceInterval\":[2517,2520]},\"+\"],[\"terminal\",{\"sourceInterval\":[2523,2526]},\"?\"],[\"terminal\",{\"sourceInterval\":[2529,2532]},\"~\"],[\"terminal\",{\"sourceInterval\":[2535,2538]},\"&\"]]],\"punctuation\":[\"define\",{\"sourceInterval\":[2542,2578]},null,[],[\"alt\",{\"sourceInterval\":[2556,2578]},[\"terminal\",{\"sourceInterval\":[2556,2559]},\"<\"],[\"terminal\",{\"sourceInterval\":[2562,2565]},\">\"],[\"terminal\",{\"sourceInterval\":[2568,2571]},\",\"],[\"terminal\",{\"sourceInterval\":[2574,2578]},\"--\"]]]}]);\n"],"names":["$11c66a64a5a88e06$var$Failure","pexpr","text","type","$11c66a64a5a88e06$var$isValidType","Error","this","fluffy","prototype","getPExpr","getText","getType","isDescription","isStringTerminal","isCode","isFluffy","makeFluffy","clearFluffy","subsumes","that","toString","JSON","stringify","clone","failure","toKey","$11c66a64a5a88e06$exports","$cb6ed35a9e21f48a$export$817eb92a8194bab0","$cb6ed35a9e21f48a$export$a7a9523472993e97","$cb6ed35a9e21f48a$export$1eb31d8ccbbbc638","$cb6ed35a9e21f48a$export$9cd59f9826255e47","$cb6ed35a9e21f48a$export$8f8128772e09cd81","$cb6ed35a9e21f48a$export$d6a6a8e48e4bad63","$cb6ed35a9e21f48a$export$76d90c956114f2c2","$cb6ed35a9e21f48a$export$1a47093b60e54e96","$cb6ed35a9e21f48a$export$8c70279880500ad3","$cb6ed35a9e21f48a$export$41fdc1de1da6ab9b","$cb6ed35a9e21f48a$export$f9f4599cdf73f828","$cb6ed35a9e21f48a$export$bc3bea8325045070","$cb6ed35a9e21f48a$export$83347051c3437dc9","$cb6ed35a9e21f48a$export$1e68cbf5a045c801","$cb6ed35a9e21f48a$export$999d5a1f9e17426e","$cb6ed35a9e21f48a$export$81c9cb19ca23770e","$cb6ed35a9e21f48a$var$escapeStringFor","c","String","fromCharCode","charCodeAt","optMethodName","methodName","constructor","name","cond","message","obj","propName","getterFn","memo","Object","defineProperty","get","call","assign","fn","n","arr","push","str","Array","join","x","array","duplicates","idx","length","lastIndexOf","indexOf","noDuplicates","forEach","entry","ruleName","firstChar","toUpperCase","len","optChar","ch","strings","append","contents","optDelim","charCode","s","charAt","parseInt","substring","baseToString","typeName","slice","e","$fb9cd8261316a99f$var$didWarnForPrimitiveValue","$fb9cd8261316a99f$var$Node","grammar","ctorName","matchLength","numChildren","children","childAt","indexOfChild","arg","hasChildren","hasNoChildren","onlyChild","firstChild","lastChild","childBefore","child","childIdx","childAfter","isTerminal","isNonterminal","isIteration","isOptional","toJSON","$93923a81e4fd7f44$export$f1bb6ea3bbab87ba","$93923a81e4fd7f44$export$4154a199d7d90455","$93923a81e4fd7f44$export$bd5df0f255a350f8","$93923a81e4fd7f44$export$8dd80f06eb58bfe1","$93923a81e4fd7f44$export$9a58ef0d7ad3278c","$93923a81e4fd7f44$export$1ca45c9a47aec42c","$93923a81e4fd7f44$export$25ba4469a069167","$93923a81e4fd7f44$export$5b5dd0e212d2a5bc","$93923a81e4fd7f44$export$ceb3ee475cfd64d1","$93923a81e4fd7f44$export$4802c350533dc67e","$93923a81e4fd7f44$export$ffbe1b4f1e592c3a","$93923a81e4fd7f44$export$1644ba17714857f1","$93923a81e4fd7f44$export$2d9ac7aa84f97a08","$93923a81e4fd7f44$export$a76800b3cc430f35","$93923a81e4fd7f44$export$8c5a605c8776de77","$93923a81e4fd7f44$export$580268a9119fd710","$93923a81e4fd7f44$export$43a76c134e83307c","$93923a81e4fd7f44$export$efc21ddc6aeb363d","$93923a81e4fd7f44$export$82f2f2b3ec52904","$fb9cd8261316a99f$exports","value","super","_value","primitiveValue","console","warn","childOffsets","isLexical","isSyntactic","optional","TerminalNode","$b9687b4f7417dd47$exports","Lu","Ll","Lt","Lm","Lo","Nl","Nd","Mn","Mc","Pc","Zs","L","Ltmo","$93923a81e4fd7f44$var$PExpr","withSource","interval","source","trimmed","$93923a81e4fd7f44$var$any","create","$93923a81e4fd7f44$var$end","$93923a81e4fd7f44$var$Alt","terms","$93923a81e4fd7f44$var$Iter","expr","$93923a81e4fd7f44$var$Star","$93923a81e4fd7f44$var$Plus","$93923a81e4fd7f44$var$Opt","operator","minNumMatches","maxNumMatches","Number","POSITIVE_INFINITY","from","to","index","superGrammar","body","rules","beforeTerms","afterTerms","origBody","expansionPos","factors","args","toMemoKey","_memoKey","category","pattern","allowsSkippingPrecedingSpace","$3f4ec1364805b278$var$Namespace","$46b6d70649971a22$var$createError","optInterval","getLineAndColumnMessage","shortMessage","asNamespace","objOrNamespace","createNamespace","optProps","extend","namespace","TypeError","ns","enumerable","writable","configurable","$3f4ec1364805b278$exports","$46b6d70649971a22$exports","applyExpr","grammarName","optSource","declGrammarName","expected","actual","expectedType","getArity","matchFailure","getExpectedText","getInterval","kleeneExpr","applicationStack","actuals","substituteParams","map","app","stack","stackTrace","info","ans","moreInfo","throwErrors","errors","messages","concat","$46b6d70649971a22$var$multipleErrors","$e847203d48b8b99b$export$1781a71bf0bc728d","$e847203d48b8b99b$export$be176d47c2921f22","$e847203d48b8b99b$export$e25e9b0111c8d659","$e847203d48b8b99b$export$c5fbb07c01caabdd","$e847203d48b8b99b$export$8b15d37bc3f197d4","$e847203d48b8b99b$var$strcpy","dest","src","offset","origDestLen","substr","$e847203d48b8b99b$var$lineAndColumnToMessage","ranges","lineAndCol","repeatStr","$cb6ed35a9e21f48a$exports","sb","StringBuffer","lineNum","colNum","lineNumbers","maxLen","Math","max","padLeft","$e847203d48b8b99b$var$padNumbersToEqualLength","prevLine","nextLine","appendLine","num","content","prefix","line","lineLen","indicationLine","i","startIdx","endIdx","assert","lineStartOffset","min","gutterWidth","replace","$d8c50d90e73d6ec1$var$BuiltInRules","$d8c50d90e73d6ec1$var$lexifyCount","$e847203d48b8b99b$var$builtInRulesCallbacks","cb","currOffset","prevLineStartOffset","lineEndOffset","nextLineEndOffset","idCounter","g","assertAllApplicationsAreValid","_assertAllApplicationsAreValid","$d8c50d90e73d6ec1$require$abstract","skipSyntacticCheck","ruleInfo","undeclaredRule","$d8c50d90e73d6ec1$require$isSyntactic","applicationOfSyntacticRuleFromLexicalContext","formals","wrongNumberOfArguments","isBuiltInApplySyntactic","experimentalApplySyntactic","isBuiltInCaseInsensitive","caseInsensitive","invalidParameter","incorrectArgumentType","experimentalApplySyntacticWithLexicalRuleApplication","assertChoicesHaveUniformArity","arity","term","otherArity","inconsistentArity","actualArity","expectedArity","assertIteratedExprsAreNotNullable","isNullable","kleeneExprHasNullableOperand","$96997716f7a8f475$var$Interval","sourceString","coverage","firstInterval","intervals","intervalSourcesDontMatch","coverageWith","collapsedLeft","collapsedRight","getLineAndColumn","range","minus","relativeTo","match","subInterval","newStartIdx","defineProperties","undefined","_contents","$96997716f7a8f475$exports","$f7368bebf450ed66$var$Flags","succeeded","isRootNode","isImplicitSpaces","isMemoized","isHeadOfLeftRecursion","terminatesLR","$f7368bebf450ed66$var$asEscapedString","$f7368bebf450ed66$var$Trace","input","pos1","pos2","bindings","optChildren","pos","terminatingLREntry","_flags","SKIP","toDisplayString","keys","mask","set","val","cloneWithExpr","recordLRTermination","ruleBodyTrace","walk","visitorObjOrFn","optThisArg","visitor","_walk","node","parent","depth","recurse","enter","exit","excerpt","$f7368bebf450ed66$var$getInputExcerpt","displayString","$f7368bebf450ed66$exports","$918004d506b8242c$var$TerminalNode","NonterminalNode","$918004d506b8242c$var$NonterminalNode","IterationNode","$918004d506b8242c$var$IterationNode","$2865004b486b57f5$var$getMetaInfo","grammarInterval","metaInfo","adjusted","sourceInterval","eval","state","inputStream","origPos","next","pushBinding","processFailure","atEnd","matchString","currentApplication","enterLexifiedContext","exitLexifiedContext","factor","cols","colOffsets","numMatches","prevPos","_applicationStack","row","_bindings","splice","rowOffsets","_bindingOffsets","posToOffset","lastCol","lastColOffsets","endOffset","pushFailuresInfo","popFailuresInfo","caller","posInfo","getCurrentPosInfo","isActive","handleCycle","memoKey","memoRec","shouldUseMemoizedResult","hasNecessaryInfo","useMemoizedResult","reallyEval","currentLeftRecursion","headApplication","updateInvolvedApplicationMemoKeys","memoize","examinedLength","rightmostFailureOffset","startLeftRecursion","origPosInfo","description","enterApplication","origInputStreamExaminedLength","evalOnce","currentLR","growSeedResult","endLeftRecursion","_getRightmostFailureOffset","isInvolved","failuresAtRightmostPosition","cloneRecordedFailures","isTracing","getTraceEntry","traceEntry","exitApplication","offsets","lrMemoRec","newValue","seedTrace","trace","pop","test","outputRecipe","toLowerCase","introduceParams","_isNullable","some","every","key","hasOwnProperty","inlined","copyWithoutDuplicates","$c4c7835ce1acfaff$var$copyWithoutDuplicates","$c4c7835ce1acfaff$var$isRestrictedJSIdentifier","$c4c7835ce1acfaff$var$resolveDuplicatedNames","argumentNameList","count","argName","dupArgName","subscript","toArgumentNameList","abstract","firstArgIndex","noDupCheck","termArgNameLists","numArgs","colIdx","col","rowIdx","uniqueNames","factorArgumentNameList","exprArgumentString","ps","toFailure","t","f","$85665160fb8f362c$var$CaseInsensitiveTerminal","$85665160fb8f362c$require$PExpr","param","_getString","terminal","$85665160fb8f362c$require$Terminal","matchStr","$85665160fb8f362c$require$TerminalNode","$85665160fb8f362c$exports","$6ca09e5ace88f0ae$var$InputStream","optIgnoreCase","sourceSlice","optEndIdx","$6ca09e5ace88f0ae$exports","$423e136c86b2ffa6$var$MatchResult","matcher","startExpr","cst","cstOffset","rightmostFailurePosition","optRecordedFailures","_cst","_cstOffset","_rightmostFailurePosition","_rightmostFailures","failed","detail","getRightmostFailurePosition","errorInfo","getRightmostFailures","setInput","matchResultWithFailures","_match","failures","filter","$423e136c86b2ffa6$exports","$9d5d6c286b284d97$var$PosInfo","applicationMemoKeyStack","maxExaminedLength","maxRightmostFailureOffset","$2f0d859d7d94a9ca$var$builtInApplySyntacticBody","application","isLeftRecursion","nextLeftRecursion","indexOfFirstInvolvedRule","involvedApplicationMemoKeys","applicationMemoKey","clearObsoleteEntries","invalidatedIdx","k","$9d5d6c286b284d97$exports","builtInRules","$2f0d859d7d94a9ca$var$applySpaces","$2f0d859d7d94a9ca$var$MatchState","optPositionToRecordFailures","memoTable","_posStack","inLexifiedContextStack","_rightmostFailurePositionStack","_recordedFailuresStack","positionToRecordFailures","recordedFailures","$6d1ca06b119389ba$var$Matcher","optNode","inSyntacticContext","inLexifiedContext","skipSpaces","popBinding","skipSpacesIfInSyntacticContext","maybeSkipSpacesBefore","numBindings","truncateBindings","newLength","getPosInfo","recordFailure","shouldCloneIfNew","recordFailures","getMemoizedTraceEntry","memoRecRightmostFailurePosition","origNumBindings","origRecordedFailures","memoPos","origTrace","getMatchResult","rightmostFailures","getTrace","matchResult","rootTrace","result","$2f0d859d7d94a9ca$exports","getInput","replaceInputRange","currentInput","restOfMemoTable","optStartApplicationStr","_getStartExpr","tracing","applicationStr","defaultStartRule","startApp","parseApplication","$6d1ca06b119389ba$exports","$8e72d2bd46de1096$var$globalActionStack","$8e72d2bd46de1096$var$prototypeGrammar","$8e72d2bd46de1096$var$prototypeGrammarSemantics","$8e72d2bd46de1096$var$hasOwnProperty","prop","$8e72d2bd46de1096$var$Wrapper","baseInterval","_node","_baseInterval","_childWrappers","_forgetMemoizedResultFor","attributeName","_semantics","attributeKeys","childWrapper","childNode","base","wrap","_children","iteration","optChildWrappers","childWrappers","childNodes","iter","$8e72d2bd46de1096$require$IterationNode","wrapper","$8e72d2bd46de1096$var$Semantics","superSemantics","self","checkedActionDicts","Wrapper","checkActionDictsIfHaventAlready","equals","_inheritsFrom","operations","attributes","$8e72d2bd46de1096$var$parseSignature","signature","r","parse","checkActionDicts","checkActionDict","toRecipe","semanticsOnly","hasSuperSemantics","BuiltInSemantics","_getSemantics","superSemanticsGrammar","relatedGrammar","semanticOperations","actionDict","builtInDefault","method","srcArray","actionName","trim","addOperationOrAttribute","typePlural","parsedNameAndFormalArgs","assertNewName","doIt","formal","missingSemanticAction","apply","$8e72d2bd46de1096$var$newDefaultAction","realActionDict","_default","$8e72d2bd46de1096$var$Operation","$8e72d2bd46de1096$var$Attribute","thisThing","arguments","argsObj","entries","oldArgs","execute","extendOperationOrAttribute","inheritedFormals","inheritedActionDict","newActionDict","optBaseInterval","createSemantics","optSuperSemantics","proxy","addOperation","extendOperation","addAttribute","extendAttribute","_getActionDict","operationOrAttributeName","action","_remove","semantic","getOperationNames","getAttributeNames","getGrammar","bind","_checkTopDownActionDict","semantics","nodeWrapper","actionFn","_nonterminal","module","exports","$fce7ed0fecea3609$exports","makeRecipe","AttributeSignature","OperationSignature","Formals","nameFirst","nameRest","operationsAndAttributesGrammar","parcelRequire","actions","empty","nonEmpty","first","_","rest","emptyListOf","nonemptyListOf","EmptyListOf","NonemptyListOf","$8e72d2bd46de1096$var$initBuiltInSemantics","optFormals","oparen","fs","cparen","asIteration","$8e72d2bd46de1096$exports","$f9697f7a5ded4a61$var$SPECIAL_ACTION_NAMES","$f9697f7a5ded4a61$var$getSortedRuleValues","sort","$f9697f7a5ded4a61$var$Grammar","optDefaultStartRule","$f9697f7a5ded4a61$var$ohmGrammar","$f9697f7a5ded4a61$var$buildGrammar","initApplicationParser","builderFn","isBuiltIn","ProtoBuiltInRules","BuiltInRules","myRules","otherRules","rule","optStartApplication","m","extendSemantics","what","problems","v","includes","_topDownActionArity","details","prettyProblems","problem","error","superGrammarExpr","startRule","isDefinition","operation","bodyRecipe","superGrammarOutput","recipeElements","toOperationActionDictionaryTemplate","_toOperationOrAttributeActionDictionaryTemplate","toAttributeActionDictionaryTemplate","addSemanticActionTemplate","wrongNumberOfParameters","any","primitive","end","lower","upper","unicodeLtmo","spaces","space","$f9697f7a5ded4a61$exports","$0963dadbfa19f7d8$var$GrammarDecl","$02ffbb5c681998e1$var$Builder","ensureSuperGrammar","withSuperGrammar","ensureSuperGrammarRuleForOverriding","cannotOverrideUndeclaredRule","installOverriddenOrExtendedRule","duplicateParameterNames","expectedFormals","expectedNumFormals","install","withDefaultStartRule","build","grammarErrors","grammarHasInvalidApplications","e1","define","duplicateRuleDeclaration","override","descIgnored","fragment","cannotExtendUndeclaredRule","$0963dadbfa19f7d8$exports","currentDecl","currentRuleName","newGrammar","gDecl","fromRecipe","ruleRecipe","alt","termArgs","seq","factorArgs","star","plus","opt","not","la","lookahead","lex","optParams","recipe","$02ffbb5c681998e1$exports","$fce7ed0fecea3609$var$ohmGrammar","$d9b41dca5c8c8e99$exports","__GLOBAL_OHM_VERSION__","version","$fce7ed0fecea3609$var$superSplicePlaceholder","$fce7ed0fecea3609$var$buildGrammar","optOhmGrammarForTesting","builder","decl","currentRuleFormals","overriding","Grammars","grammarIter","visit","Grammar","id","_open","_close","duplicateGrammarDeclaration","SuperGrammar","superGrammarName","undeclaredGrammar","Rule_define","d","b","Rule_override","Rule_extend","RuleBody","OverrideRuleBody","multipleSuperSplices","opointy","cpointy","Params","Alt","seqs","TopLevelTerm_inline","inlineRuleName","isNewRuleDeclaration","params","OverrideTopLevelTerm_superSplice","Seq","Iter_star","Iter_plus","Iter_opt","Pred_not","Pred_lookahead","Lex_lex","Base_application","Base_range","Base_terminal","Base_paren","open","close","ruleDescr","ruleDescrText","caseName","space1","space2","cs","oneCharTerminal","terminalChar","escapeChar","xs","_terminal","helpers","$fce7ed0fecea3609$var$grammars","optNamespace","isBuffer","grammarSyntaxError","$fce7ed0fecea3609$var$compileAndLoad","VisitorFamily","semanticsForToAST","toAST","helper","$98ec399d36ddcccf$var$getProp","thing","$98ec399d36ddcccf$var$mapProp","$98ec399d36ddcccf$var$getPropWalkFn","descriptor","parts","split","$98ec399d36ddcccf$var$getProps","walkFns","walkFn","$98ec399d36ddcccf$var$isRestrictedIdentifier","$98ec399d36ddcccf$var$trim","$98ec399d36ddcccf$var$VisitorFamily","config","_shapes","shapes","_getTag","getTag","Adapter","family","_adaptee","_family","valueOf","_arities","_getChildren","shape","isArray","$98ec399d36ddcccf$var$getWalkFn","_wrap","_checkActionDict","dict","sig","$98ec399d36ddcccf$var$parseSignature","tag","$5ddfc6934df319e1$var$defaultOperation","mapping","realChildren","propMap","mappedProp","_iter","sep","res","termName","grammarNames","optNodeOrNodeList","ohmGrammar","$93923a81e4fd7f44$exports","$e847203d48b8b99b$exports","extras","_buildGrammar","alnum","letter","digit","hexDigit","ListOf","listOf","Rule","TopLevelTerm","OverrideTopLevelTerm","Iter","Pred","Lex","Base","ident","escapeChar_backslash","escapeChar_doubleQuote","escapeChar_singleQuote","escapeChar_backspace","escapeChar_lineFeed","escapeChar_carriageReturn","escapeChar_tab","escapeChar_unicodeEscape","escapeChar_hexEscape","comment_singleLine","comment_multiLine","comment","tokens","token","punctuation"],"version":3,"file":"main.js.map"}