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,OAF8BrE,GAAA,KAAA8hC,IAClDz9B,EAAAggC,EAAA3kC,KAAA,KAAMomB,EAAQ5f,EAAM28B,EAAkBjiC,IACjCkiC,UAAYvW,EAAGloB,CACxB,CAoBC,OAlBDU,GAAA+8B,EAAA,EAAA9iC,IAAA,UAAAc,MAIA,SAAQq1B,GAIJ,OAHIl1B,KAAKW,MACLu0B,EAAI/wB,KAAKnE,KAAKW,KAAKwB,YAEhBnC,KAAK6iC,UAAY,CAC5B,GAAC,CAAA9jC,IAAA,WAAAc,MAED,WACI,OAAiB,MAAbG,KAAKW,KACE,aAAeX,KAAK6lB,OAAOzmB,IAAIY,KAAK8K,OACvC,KAAO9K,KAAK6lB,OAAOzmB,IAAIY,KAAK6iC,WAAa,IAE1C,cAAgB7iC,KAAK6lB,OAAOzmB,IAAIY,KAAK8K,OACxC,KAAO9K,KAAK6lB,OAAOzmB,IAAIY,KAAK6iC,WAAa,KAAQ7iC,KAAKW,KAAO,IACrE,KAACkhC,CAAA,CA/BU,CAASgC,IC1WxB,UACIv5B,IAAAA,GAAK4V,IAAAA,GAAK7Z,QAAAA,GAASg+B,KAAAA,GAAMp1B,KAAAA,GAAM2R,MAAAA,GAAO9gB,MAAAA,EAAOsiB,YAAAA,GAAakiB,YAAAA,GAAarK,WAAAA,GAAYQ,YAAAA,GAAaqD,kBAAAA,GAAmBpa,MAAAA,GAAOwa,OAAAA,GAC1HyC,kBAAAA,GAAmB94B,SAAAA,EAAUE,YAAAA,EAAaqN,YAAAA,GAAamvB,MAAAA,GAAOtD,oBAAAA,G","sources":["webpack://antlr4-js/webpack/bootstrap","webpack://antlr4-js/webpack/runtime/define property getters","webpack://antlr4-js/webpack/runtime/hasOwnProperty shorthand","webpack://antlr4-js/webpack/runtime/make namespace object","webpack://antlr4-js/./src/antlr4/Token.js","webpack://antlr4-js/./src/antlr4/utils/equalArrays.js","webpack://antlr4-js/./src/antlr4/utils/stringHashCode.js","webpack://antlr4-js/./src/antlr4/misc/HashCode.js","webpack://antlr4-js/./src/antlr4/utils/standardHashCodeFunction.js","webpack://antlr4-js/./src/antlr4/utils/standardEqualsFunction.js","webpack://antlr4-js/./src/antlr4/utils/valueToString.js","webpack://antlr4-js/./src/antlr4/utils/arrayToString.js","webpack://antlr4-js/./src/antlr4/misc/HashSet.js","webpack://antlr4-js/./src/antlr4/atn/SemanticContext.js","webpack://antlr4-js/./src/antlr4/atn/ATNConfig.js","webpack://antlr4-js/./src/antlr4/misc/Interval.js","webpack://antlr4-js/./src/antlr4/misc/IntervalSet.js","webpack://antlr4-js/./src/antlr4/state/ATNState.js","webpack://antlr4-js/./src/antlr4/state/RuleStopState.js","webpack://antlr4-js/./src/antlr4/transition/Transition.js","webpack://antlr4-js/./src/antlr4/transition/RuleTransition.js","webpack://antlr4-js/./src/antlr4/transition/SetTransition.js","webpack://antlr4-js/./src/antlr4/transition/NotSetTransition.js","webpack://antlr4-js/./src/antlr4/transition/WildcardTransition.js","webpack://antlr4-js/./src/antlr4/atn/AbstractPredicateTransition.js","webpack://antlr4-js/./src/antlr4/tree/ParseTree.js","webpack://antlr4-js/./src/antlr4/tree/SyntaxTree.js","webpack://antlr4-js/./src/antlr4/tree/Tree.js","webpack://antlr4-js/./src/antlr4/tree/RuleNode.js","webpack://antlr4-js/./src/antlr4/tree/TerminalNode.js","webpack://antlr4-js/./src/antlr4/tree/ErrorNode.js","webpack://antlr4-js/./src/antlr4/tree/Trees.js","webpack://antlr4-js/./src/antlr4/utils/escapeWhitespace.js","webpack://antlr4-js/./src/antlr4/context/RuleContext.js","webpack://antlr4-js/./src/antlr4/context/PredictionContext.js","webpack://antlr4-js/./src/antlr4/context/ArrayPredictionContext.js","webpack://antlr4-js/./src/antlr4/context/SingletonPredictionContext.js","webpack://antlr4-js/./src/antlr4/context/EmptyPredictionContext.js","webpack://antlr4-js/./src/antlr4/misc/HashMap.js","webpack://antlr4-js/./src/antlr4/context/PredictionContextUtils.js","webpack://antlr4-js/./src/antlr4/misc/BitSet.js","webpack://antlr4-js/./src/antlr4/atn/LL1Analyzer.js","webpack://antlr4-js/./src/antlr4/atn/ATN.js","webpack://antlr4-js/./src/antlr4/state/BasicState.js","webpack://antlr4-js/./src/antlr4/state/DecisionState.js","webpack://antlr4-js/./src/antlr4/state/BlockStartState.js","webpack://antlr4-js/./src/antlr4/state/BlockEndState.js","webpack://antlr4-js/./src/antlr4/state/LoopEndState.js","webpack://antlr4-js/./src/antlr4/state/RuleStartState.js","webpack://antlr4-js/./src/antlr4/state/TokensStartState.js","webpack://antlr4-js/./src/antlr4/state/PlusLoopbackState.js","webpack://antlr4-js/./src/antlr4/state/StarLoopbackState.js","webpack://antlr4-js/./src/antlr4/state/StarLoopEntryState.js","webpack://antlr4-js/./src/antlr4/state/PlusBlockStartState.js","webpack://antlr4-js/./src/antlr4/state/StarBlockStartState.js","webpack://antlr4-js/./src/antlr4/state/BasicBlockStartState.js","webpack://antlr4-js/./src/antlr4/transition/AtomTransition.js","webpack://antlr4-js/./src/antlr4/transition/RangeTransition.js","webpack://antlr4-js/./src/antlr4/transition/ActionTransition.js","webpack://antlr4-js/./src/antlr4/transition/EpsilonTransition.js","webpack://antlr4-js/./src/antlr4/atn/Predicate.js","webpack://antlr4-js/./src/antlr4/transition/PredicateTransition.js","webpack://antlr4-js/./src/antlr4/atn/PrecedencePredicate.js","webpack://antlr4-js/./src/antlr4/transition/PrecedencePredicateTransition.js","webpack://antlr4-js/./src/antlr4/atn/ATNDeserializationOptions.js","webpack://antlr4-js/./src/antlr4/action/LexerAction.js","webpack://antlr4-js/./src/antlr4/action/LexerSkipAction.js","webpack://antlr4-js/./src/antlr4/atn/LexerActionType.js","webpack://antlr4-js/./src/antlr4/action/LexerChannelAction.js","webpack://antlr4-js/./src/antlr4/action/LexerCustomAction.js","webpack://antlr4-js/./src/antlr4/action/LexerMoreAction.js","webpack://antlr4-js/./src/antlr4/action/LexerTypeAction.js","webpack://antlr4-js/./src/antlr4/action/LexerPushModeAction.js","webpack://antlr4-js/./src/antlr4/action/LexerPopModeAction.js","webpack://antlr4-js/./src/antlr4/action/LexerModeAction.js","webpack://antlr4-js/./src/antlr4/atn/ATNDeserializer.js","webpack://antlr4-js/./src/antlr4/atn/ATNType.js","webpack://antlr4-js/./src/antlr4/error/ErrorListener.js","webpack://antlr4-js/./src/antlr4/error/ConsoleErrorListener.js","webpack://antlr4-js/./src/antlr4/error/ProxyErrorListener.js","webpack://antlr4-js/./src/antlr4/Recognizer.js","webpack://antlr4-js/./src/antlr4/CommonToken.js","webpack://antlr4-js/./src/antlr4/CommonTokenFactory.js","webpack://antlr4-js/./src/antlr4/error/RecognitionException.js","webpack://antlr4-js/./src/antlr4/error/LexerNoViableAltException.js","webpack://antlr4-js/./src/antlr4/Lexer.js","webpack://antlr4-js/./src/antlr4/atn/ATNConfigSet.js","webpack://antlr4-js/./src/antlr4/dfa/DFAState.js","webpack://antlr4-js/./src/antlr4/atn/ATNSimulator.js","webpack://antlr4-js/./src/antlr4/atn/OrderedATNConfigSet.js","webpack://antlr4-js/./src/antlr4/atn/LexerATNConfig.js","webpack://antlr4-js/./src/antlr4/action/LexerIndexedCustomAction.js","webpack://antlr4-js/./src/antlr4/atn/LexerActionExecutor.js","webpack://antlr4-js/./src/antlr4/atn/LexerATNSimulator.js","webpack://antlr4-js/./src/antlr4/dfa/PredPrediction.js","webpack://antlr4-js/./src/antlr4/misc/AltDict.js","webpack://antlr4-js/./src/antlr4/atn/PredictionMode.js","webpack://antlr4-js/./src/antlr4/error/NoViableAltException.js","webpack://antlr4-js/./src/antlr4/utils/DoubleDict.js","webpack://antlr4-js/./src/antlr4/atn/ParserATNSimulator.js","webpack://antlr4-js/./src/antlr4/atn/PredictionContextCache.js","webpack://antlr4-js/./src/antlr4/atn/index.js","webpack://antlr4-js/./src/antlr4/dfa/DFASerializer.js","webpack://antlr4-js/./src/antlr4/dfa/LexerDFASerializer.js","webpack://antlr4-js/./src/antlr4/dfa/DFA.js","webpack://antlr4-js/./src/antlr4/dfa/index.js","webpack://antlr4-js/./src/antlr4/context/index.js","webpack://antlr4-js/./src/antlr4/misc/index.js","webpack://antlr4-js/./src/antlr4/tree/ParseTreeListener.js","webpack://antlr4-js/./src/antlr4/tree/ParseTreeVisitor.js","webpack://antlr4-js/./src/antlr4/tree/ParseTreeWalker.js","webpack://antlr4-js/./src/antlr4/tree/index.js","webpack://antlr4-js/./src/antlr4/error/InputMismatchException.js","webpack://antlr4-js/./src/antlr4/error/FailedPredicateException.js","webpack://antlr4-js/./src/antlr4/error/DiagnosticErrorListener.js","webpack://antlr4-js/./src/antlr4/error/ParseCancellationException.js","webpack://antlr4-js/./src/antlr4/error/DefaultErrorStrategy.js","webpack://antlr4-js/./src/antlr4/error/ErrorStrategy.js","webpack://antlr4-js/./src/antlr4/error/BailErrorStrategy.js","webpack://antlr4-js/./src/antlr4/error/index.js","webpack://antlr4-js/./src/antlr4/CharStream.js","webpack://antlr4-js/./src/antlr4/InputStream.js","webpack://antlr4-js/./src/antlr4/FileStream.js","webpack://antlr4-js/./src/antlr4/CharStreams.js","webpack://antlr4-js/./src/antlr4/utils/index.js","webpack://antlr4-js/./src/antlr4/utils/stringToCharArray.js","webpack://antlr4-js/./src/antlr4/BufferedTokenStream.js","webpack://antlr4-js/./src/antlr4/TokenStream.js","webpack://antlr4-js/./src/antlr4/CommonTokenStream.js","webpack://antlr4-js/./src/antlr4/TraceListener.js","webpack://antlr4-js/./src/antlr4/Parser.js","webpack://antlr4-js/./src/antlr4/tree/TerminalNodeImpl.js","webpack://antlr4-js/./src/antlr4/tree/ErrorNodeImpl.js","webpack://antlr4-js/./src/antlr4/context/ParserRuleContext.js","webpack://antlr4-js/./src/antlr4/TokenStreamRewriter.js","webpack://antlr4-js/./src/antlr4/index.web.js"],"sourcesContent":["// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","/* Copyright (c) 2012-2022 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause license that\n * can be found in the LICENSE.txt file in the project root.\n */\n\n/**\n * A token has properties: text, type, line, character position in the line\n * (so we can ignore tabs), token channel, index, and source from which\n * we obtained this token.\n */\nexport default class Token {\n\n\tconstructor() {\n\t\tthis.source = null;\n\t\tthis.type = null; // token type of the token\n\t\tthis.channel = null; // The parser ignores everything not on DEFAULT_CHANNEL\n\t\tthis.start = null; // optional; return -1 if not implemented.\n\t\tthis.stop = null; // optional; return -1 if not implemented.\n\t\tthis.tokenIndex = null; // from 0..n-1 of the token object in the input stream\n\t\tthis.line = null; // line=1..n of the 1st character\n\t\tthis.column = null; // beginning of the line at which it occurs, 0..n-1\n\t\tthis._text = null; // text of the token.\n\t}\n\n\tgetTokenSource() {\n\t\treturn this.source[0];\n\t}\n\n\tgetInputStream() {\n\t\treturn this.source[1];\n\t}\n\n\tget text(){\n\t\treturn this._text;\n\t}\n\n\tset text(text) {\n\t\tthis._text = text;\n\t}\n}\n\nToken.INVALID_TYPE = 0;\n\n/**\n * During lookahead operations, this \"token\" signifies we hit rule end ATN state\n * and did not follow it despite needing to.\n */\nToken.EPSILON = -2;\n\nToken.MIN_USER_TOKEN_TYPE = 1;\n\nToken.EOF = -1;\n\n/**\n * All tokens go to the parser (unless skip() is called in that rule)\n * on a particular \"channel\". The parser tunes to a particular channel\n * so that whitespace etc... can go to the parser on a \"hidden\" channel.\n */\nToken.DEFAULT_CHANNEL = 0;\n\n/**\n * Anything on different channel than DEFAULT_CHANNEL is not parsed\n * by parser.\n */\nToken.HIDDEN_CHANNEL = 1;\n\n","/* Copyright (c) 2012-2022 The ANTLR Project Contributors. All rights reserved.\n * Use is of this file is governed by the BSD 3-clause license that\n * can be found in the LICENSE.txt file in the project root.\n */\nexport default function equalArrays(a, b) {\n    if (!Array.isArray(a) || !Array.isArray(b))\n        return false;\n    if (a === b)\n        return true;\n    if (a.length !== b.length)\n        return false;\n    for (let i = 0; i < a.length; i++) {\n        if (a[i] === b[i])\n            continue;\n        if (!a[i].equals || !a[i].equals(b[i]))\n            return false;\n    }\n    return true;\n}\n","/* Copyright (c) 2012-2022 The ANTLR Project Contributors. All rights reserved.\n * Use is of this file is governed by the BSD 3-clause license that\n * can be found in the LICENSE.txt file in the project root.\n */\n\nexport const StringSeedHashCode = Math.round(Math.random() * Math.pow(2, 32));\n\nexport function stringHashCode (value) {\n    if (!value) {\n        return 0;\n    }\n    const type = typeof value;\n    const key = type === 'string' ? value : type === 'object' && value.toString ? value.toString() : false;\n    if (!key) {\n        return 0;\n    }\n    let h1b, k1;\n\n    const remainder = key.length & 3; // key.length % 4\n    const bytes = key.length - remainder;\n    let h1 = StringSeedHashCode;\n    const c1 = 0xcc9e2d51;\n    const c2 = 0x1b873593;\n    let i = 0;\n\n    while (i < bytes) {\n        k1 =\n            ((key.charCodeAt(i) & 0xff)) |\n            ((key.charCodeAt(++i) & 0xff) << 8) |\n            ((key.charCodeAt(++i) & 0xff) << 16) |\n            ((key.charCodeAt(++i) & 0xff) << 24);\n        ++i;\n\n        k1 = ((((k1 & 0xffff) * c1) + ((((k1 >>> 16) * c1) & 0xffff) << 16))) & 0xffffffff;\n        k1 = (k1 << 15) | (k1 >>> 17);\n        k1 = ((((k1 & 0xffff) * c2) + ((((k1 >>> 16) * c2) & 0xffff) << 16))) & 0xffffffff;\n\n        h1 ^= k1;\n        h1 = (h1 << 13) | (h1 >>> 19);\n        h1b = ((((h1 & 0xffff) * 5) + ((((h1 >>> 16) * 5) & 0xffff) << 16))) & 0xffffffff;\n        h1 = (((h1b & 0xffff) + 0x6b64) + ((((h1b >>> 16) + 0xe654) & 0xffff) << 16));\n    }\n\n    k1 = 0;\n\n    switch (remainder) {\n        case 3:\n            k1 ^= (key.charCodeAt(i + 2) & 0xff) << 16;\n        // no-break\n        case 2:\n            k1 ^= (key.charCodeAt(i + 1) & 0xff) << 8;\n        // no-break\n        case 1:\n            k1 ^= (key.charCodeAt(i) & 0xff);\n            k1 = (((k1 & 0xffff) * c1) + ((((k1 >>> 16) * c1) & 0xffff) << 16)) & 0xffffffff;\n            k1 = (k1 << 15) | (k1 >>> 17);\n            k1 = (((k1 & 0xffff) * c2) + ((((k1 >>> 16) * c2) & 0xffff) << 16)) & 0xffffffff;\n            h1 ^= k1;\n    }\n\n    h1 ^= key.length;\n\n    h1 ^= h1 >>> 16;\n    h1 = (((h1 & 0xffff) * 0x85ebca6b) + ((((h1 >>> 16) * 0x85ebca6b) & 0xffff) << 16)) & 0xffffffff;\n    h1 ^= h1 >>> 13;\n    h1 = ((((h1 & 0xffff) * 0xc2b2ae35) + ((((h1 >>> 16) * 0xc2b2ae35) & 0xffff) << 16))) & 0xffffffff;\n    h1 ^= h1 >>> 16;\n\n    return h1 >>> 0;\n}\n","/* Copyright (c) 2012-2022 The ANTLR Project Contributors. All rights reserved.\n * Use is of this file is governed by the BSD 3-clause license that\n * can be found in the LICENSE.txt file in the project root.\n */\nimport { stringHashCode } from \"../utils/stringHashCode.js\";\n\nexport default class HashCode {\n\n    constructor() {\n        this.count = 0;\n        this.hash = 0;\n    }\n\n    update() {\n        for(let i=0;i<arguments.length;i++) {\n            const value = arguments[i];\n            if (value == null)\n                continue;\n            if(Array.isArray(value))\n                this.update.apply(this, value);\n            else {\n                let k = 0;\n                switch (typeof(value)) {\n                    case 'undefined':\n                    case 'function':\n                        continue;\n                    case 'number':\n                    case 'boolean':\n                        k = value;\n                        break;\n                    case 'string':\n                        k = stringHashCode(value);\n                        break;\n                    default:\n                        if(value.updateHashCode)\n                            value.updateHashCode(this);\n                        else\n                            console.log(\"No updateHashCode for \" + value.toString())\n                        continue;\n                }\n                k = k * 0xCC9E2D51;\n                k = (k << 15) | (k >>> (32 - 15));\n                k = k * 0x1B873593;\n                this.count = this.count + 1;\n                let hash = this.hash ^ k;\n                hash = (hash << 13) | (hash >>> (32 - 13));\n                hash = hash * 5 + 0xE6546B64;\n                this.hash = hash;\n            }\n        }\n    }\n\n    finish() {\n        let hash = this.hash ^ (this.count * 4);\n        hash = hash ^ (hash >>> 16);\n        hash = hash * 0x85EBCA6B;\n        hash = hash ^ (hash >>> 13);\n        hash = hash * 0xC2B2AE35;\n        hash = hash ^ (hash >>> 16);\n        return hash;\n    }\n\n    static hashStuff() {\n        const hash = new HashCode();\n        hash.update.apply(hash, arguments);\n        return hash.finish();\n    }\n}\n","/* Copyright (c) 2012-2022 The ANTLR Project Contributors. All rights reserved.\n * Use is of this file is governed by the BSD 3-clause license that\n * can be found in the LICENSE.txt file in the project root.\n */\nimport { stringHashCode } from \"./stringHashCode.js\";\n\nexport default function standardHashCodeFunction(a) {\n    return a ? typeof a === 'string' ? stringHashCode(a) : a.hashCode() : -1;\n}\n","/* Copyright (c) 2012-2022 The ANTLR Project Contributors. All rights reserved.\n * Use is of this file is governed by the BSD 3-clause license that\n * can be found in the LICENSE.txt file in the project root.\n */\nexport default function standardEqualsFunction(a, b) {\n    return a ? a.equals(b) : a===b;\n}\n","/* Copyright (c) 2012-2022 The ANTLR Project Contributors. All rights reserved.\n * Use is of this file is governed by the BSD 3-clause license that\n * can be found in the LICENSE.txt file in the project root.\n */\nexport default function valueToString(v) {\n    return v === null ? \"null\" : v;\n}\n","/* Copyright (c) 2012-2022 The ANTLR Project Contributors. All rights reserved.\n * Use is of this file is governed by the BSD 3-clause license that\n * can be found in the LICENSE.txt file in the project root.\n */\nimport valueToString from \"./valueToString.js\";\n\nexport default function arrayToString(a) {\n    return Array.isArray(a) ? (\"[\" + a.map(valueToString).join(\", \") + \"]\") : \"null\";\n}\n","/* Copyright (c) 2012-2022 The ANTLR Project Contributors. All rights reserved.\n * Use is of this file is governed by the BSD 3-clause license that\n * can be found in the LICENSE.txt file in the project root.\n */\nimport standardHashCodeFunction from \"../utils/standardHashCodeFunction.js\";\nimport standardEqualsFunction from \"../utils/standardEqualsFunction.js\";\nimport arrayToString from \"../utils/arrayToString.js\";\n\nconst HASH_KEY_PREFIX = \"h-\";\n\nexport default class HashSet {\n\n    constructor(hashFunction, equalsFunction) {\n        this.data = {};\n        this.hashFunction = hashFunction || standardHashCodeFunction;\n        this.equalsFunction = equalsFunction || standardEqualsFunction;\n    }\n\n    add(value) {\n        const key = HASH_KEY_PREFIX + this.hashFunction(value);\n        if (key in this.data) {\n            const values = this.data[key];\n            for (let i = 0; i < values.length; i++) {\n                if (this.equalsFunction(value, values[i])) {\n                    return values[i];\n                }\n            }\n            values.push(value);\n            return value;\n        } else {\n            this.data[key] = [value];\n            return value;\n        }\n    }\n\n    has(value) {\n        return this.get(value) != null;\n    }\n\n    get(value) {\n        const key = HASH_KEY_PREFIX + this.hashFunction(value);\n        if (key in this.data) {\n            const values = this.data[key];\n            for (let i = 0; i < values.length; i++) {\n                if (this.equalsFunction(value, values[i])) {\n                    return values[i];\n                }\n            }\n        }\n        return null;\n    }\n\n    values() {\n        return Object.keys(this.data).filter(key => key.startsWith(HASH_KEY_PREFIX)).flatMap(key => this.data[key], this);\n    }\n\n    toString() {\n        return arrayToString(this.values());\n    }\n\n    get length() {\n        return Object.keys(this.data).filter(key => key.startsWith(HASH_KEY_PREFIX)).map(key => this.data[key].length, this).reduce((accum, item) => accum + item, 0);\n    }\n}\n","/* Copyright (c) 2012-2022 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause license that\n * can be found in the LICENSE.txt file in the project root.\n */\n\nimport equalArrays from \"../utils/equalArrays.js\";\nimport HashCode from \"../misc/HashCode.js\";\nimport HashSet from \"../misc/HashSet.js\";\n\n/**\n * A tree structure used to record the semantic context in which\n * an ATN configuration is valid.  It's either a single predicate,\n * a conjunction {@code p1&&p2}, or a sum of products {@code p1||p2}.\n *\n * <p>I have scoped the {@link AND}, {@link OR}, and {@link Predicate} subclasses of\n * {@link SemanticContext} within the scope of this outer class.</p>\n */\nexport default class SemanticContext {\n\n\thashCode() {\n\t\tconst hash = new HashCode();\n\t\tthis.updateHashCode(hash);\n\t\treturn hash.finish();\n\t}\n\n\t/**\n\t * For context independent predicates, we evaluate them without a local\n\t * context (i.e., null context). That way, we can evaluate them without\n\t * having to create proper rule-specific context during prediction (as\n\t * opposed to the parser, which creates them naturally). In a practical\n\t * sense, this avoids a cast exception from RuleContext to myruleContext.\n\t *\n\t * <p>For context dependent predicates, we must pass in a local context so that\n\t * references such as $arg evaluate properly as _localctx.arg. We only\n\t * capture context dependent predicates in the context in which we begin\n\t * prediction, so we passed in the outer context here in case of context\n\t * dependent predicate evaluation.</p>\n\t */\n\tevaluate(parser, outerContext) {}\n\n\t/**\n\t * Evaluate the precedence predicates for the context and reduce the result.\n\t *\n\t * @param parser The parser instance.\n\t * @param outerContext The current parser context object.\n\t * @return The simplified semantic context after precedence predicates are\n\t * evaluated, which will be one of the following values.\n\t * <ul>\n\t * <li>{@link //NONE}: if the predicate simplifies to {@code true} after\n\t * precedence predicates are evaluated.</li>\n\t * <li>{@code null}: if the predicate simplifies to {@code false} after\n\t * precedence predicates are evaluated.</li>\n\t * <li>{@code this}: if the semantic context is not changed as a result of\n\t * precedence predicate evaluation.</li>\n\t * <li>A non-{@code null} {@link SemanticContext}: the new simplified\n\t * semantic context after precedence predicates are evaluated.</li>\n\t * </ul>\n\t */\n\tevalPrecedence(parser, outerContext) {\n\t\treturn this;\n\t}\n\n\tstatic andContext(a, b) {\n\t\tif (a === null || a === SemanticContext.NONE) {\n\t\t\treturn b;\n\t\t}\n\t\tif (b === null || b === SemanticContext.NONE) {\n\t\t\treturn a;\n\t\t}\n\t\tconst result = new AND(a, b);\n\t\tif (result.opnds.length === 1) {\n\t\t\treturn result.opnds[0];\n\t\t} else {\n\t\t\treturn result;\n\t\t}\n\t}\n\n\tstatic orContext(a, b) {\n\t\tif (a === null) {\n\t\t\treturn b;\n\t\t}\n\t\tif (b === null) {\n\t\t\treturn a;\n\t\t}\n\t\tif (a === SemanticContext.NONE || b === SemanticContext.NONE) {\n\t\t\treturn SemanticContext.NONE;\n\t\t}\n\t\tconst result = new OR(a, b);\n\t\tif (result.opnds.length === 1) {\n\t\t\treturn result.opnds[0];\n\t\t} else {\n\t\t\treturn result;\n\t\t}\n\t}\n}\n\n\n\nclass AND extends SemanticContext {\n\t/**\n\t * A semantic context which is true whenever none of the contained contexts\n\t * is false\n\t */\n\tconstructor(a, b) {\n\t\tsuper();\n\t\tconst operands = new HashSet();\n\t\tif (a instanceof AND) {\n\t\t\ta.opnds.map(function(o) {\n\t\t\t\toperands.add(o);\n\t\t\t});\n\t\t} else {\n\t\t\toperands.add(a);\n\t\t}\n\t\tif (b instanceof AND) {\n\t\t\tb.opnds.map(function(o) {\n\t\t\t\toperands.add(o);\n\t\t\t});\n\t\t} else {\n\t\t\toperands.add(b);\n\t\t}\n\t\tconst precedencePredicates = filterPrecedencePredicates(operands);\n\t\tif (precedencePredicates.length > 0) {\n\t\t\t// interested in the transition with the lowest precedence\n\t\t\tlet reduced = null;\n\t\t\tprecedencePredicates.map( function(p) {\n\t\t\t\tif(reduced===null || p.precedence<reduced.precedence) {\n\t\t\t\t\treduced = p;\n\t\t\t\t}\n\t\t\t});\n\t\t\toperands.add(reduced);\n\t\t}\n\t\tthis.opnds = Array.from(operands.values());\n\t}\n\n\tequals(other) {\n\t\tif (this === other) {\n\t\t\treturn true;\n\t\t} else if (!(other instanceof AND)) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn equalArrays(this.opnds, other.opnds);\n\t\t}\n\t}\n\n\tupdateHashCode(hash) {\n\t\thash.update(this.opnds, \"AND\");\n\t}\n\n\t/**\n\t * {@inheritDoc}\n\t *\n\t * <p>\n\t * The evaluation of predicates by this context is short-circuiting, but\n\t * unordered.</p>\n\t */\n\tevaluate(parser, outerContext) {\n\t\tfor (let i = 0; i < this.opnds.length; i++) {\n\t\t\tif (!this.opnds[i].evaluate(parser, outerContext)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n\n\tevalPrecedence(parser, outerContext) {\n\t\tlet differs = false;\n\t\tconst operands = [];\n\t\tfor (let i = 0; i < this.opnds.length; i++) {\n\t\t\tconst context = this.opnds[i];\n\t\t\tconst evaluated = context.evalPrecedence(parser, outerContext);\n\t\t\tdiffers |= (evaluated !== context);\n\t\t\tif (evaluated === null) {\n\t\t\t\t// The AND context is false if any element is false\n\t\t\t\treturn null;\n\t\t\t} else if (evaluated !== SemanticContext.NONE) {\n\t\t\t\t// Reduce the result by skipping true elements\n\t\t\t\toperands.push(evaluated);\n\t\t\t}\n\t\t}\n\t\tif (!differs) {\n\t\t\treturn this;\n\t\t}\n\t\tif (operands.length === 0) {\n\t\t\t// all elements were true, so the AND context is true\n\t\t\treturn SemanticContext.NONE;\n\t\t}\n\t\tlet result = null;\n\t\toperands.map(function(o) {\n\t\t\tresult = result === null ? o : SemanticContext.andContext(result, o);\n\t\t});\n\t\treturn result;\n\t}\n\n\ttoString() {\n\t\tconst s = this.opnds.map(o => o.toString());\n\t\treturn (s.length > 3 ? s.slice(3) : s).join(\"&&\");\n\t}\n}\n\n\nclass OR extends SemanticContext {\n\t/**\n\t * A semantic context which is true whenever at least one of the contained\n\t * contexts is true\n\t */\n\tconstructor(a, b) {\n\t\tsuper();\n\t\tconst operands = new HashSet();\n\t\tif (a instanceof OR) {\n\t\t\ta.opnds.map(function(o) {\n\t\t\t\toperands.add(o);\n\t\t\t});\n\t\t} else {\n\t\t\toperands.add(a);\n\t\t}\n\t\tif (b instanceof OR) {\n\t\t\tb.opnds.map(function(o) {\n\t\t\t\toperands.add(o);\n\t\t\t});\n\t\t} else {\n\t\t\toperands.add(b);\n\t\t}\n\n\t\tconst precedencePredicates = filterPrecedencePredicates(operands);\n\t\tif (precedencePredicates.length > 0) {\n\t\t\t// interested in the transition with the highest precedence\n\t\t\tconst s = precedencePredicates.sort(function(a, b) {\n\t\t\t\treturn a.compareTo(b);\n\t\t\t});\n\t\t\tconst reduced = s[s.length-1];\n\t\t\toperands.add(reduced);\n\t\t}\n\t\tthis.opnds = Array.from(operands.values());\n\t}\n\n\tequals(other) {\n\t\tif (this === other) {\n\t\t\treturn true;\n\t\t} else if (!(other instanceof OR)) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn equalArrays(this.opnds, other.opnds);\n\t\t}\n\t}\n\n\tupdateHashCode(hash) {\n\t\thash.update(this.opnds, \"OR\");\n\t}\n\n\t/**\n\t * <p>\n\t * The evaluation of predicates by this context is short-circuiting, but\n\t * unordered.</p>\n\t */\n\tevaluate(parser, outerContext) {\n\t\tfor (let i = 0; i < this.opnds.length; i++) {\n\t\t\tif (this.opnds[i].evaluate(parser, outerContext)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}\n\n\tevalPrecedence(parser, outerContext) {\n\t\tlet differs = false;\n\t\tconst operands = [];\n\t\tfor (let i = 0; i < this.opnds.length; i++) {\n\t\t\tconst context = this.opnds[i];\n\t\t\tconst evaluated = context.evalPrecedence(parser, outerContext);\n\t\t\tdiffers |= (evaluated !== context);\n\t\t\tif (evaluated === SemanticContext.NONE) {\n\t\t\t\t// The OR context is true if any element is true\n\t\t\t\treturn SemanticContext.NONE;\n\t\t\t} else if (evaluated !== null) {\n\t\t\t\t// Reduce the result by skipping false elements\n\t\t\t\toperands.push(evaluated);\n\t\t\t}\n\t\t}\n\t\tif (!differs) {\n\t\t\treturn this;\n\t\t}\n\t\tif (operands.length === 0) {\n\t\t\t// all elements were false, so the OR context is false\n\t\t\treturn null;\n\t\t}\n\t\tconst result = null;\n\t\toperands.map(function(o) {\n\t\t\treturn result === null ? o : SemanticContext.orContext(result, o);\n\t\t});\n\t\treturn result;\n\t}\n\n\ttoString() {\n\t\tconst s = this.opnds.map(o => o.toString());\n\t\treturn (s.length > 3 ? s.slice(3) : s).join(\"||\");\n\t}\n}\n\nfunction filterPrecedencePredicates(set) {\n\tconst result = [];\n\tset.values().map( function(context) {\n\t\tif (context instanceof SemanticContext.PrecedencePredicate) {\n\t\t\tresult.push(context);\n\t\t}\n\t});\n\treturn result;\n}\n","/* Copyright (c) 2012-2022 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause license that\n * can be found in the LICENSE.txt file in the project root.\n */\n\nimport SemanticContext from './SemanticContext.js';\nimport HashCode from \"../misc/HashCode.js\";\n\nfunction checkParams(params, isCfg) {\n\tif(params===null) {\n\t\tconst result = { state:null, alt:null, context:null, semanticContext:null };\n\t\tif(isCfg) {\n\t\t\tresult.reachesIntoOuterContext = 0;\n\t\t}\n\t\treturn result;\n\t} else {\n\t\tconst props = {};\n\t\tprops.state = params.state || null;\n\t\tprops.alt = (params.alt === undefined) ? null : params.alt;\n\t\tprops.context = params.context || null;\n\t\tprops.semanticContext = params.semanticContext || null;\n\t\tif(isCfg) {\n\t\t\tprops.reachesIntoOuterContext = params.reachesIntoOuterContext || 0;\n\t\t\tprops.precedenceFilterSuppressed = params.precedenceFilterSuppressed || false;\n\t\t}\n\t\treturn props;\n\t}\n}\n\nexport default class ATNConfig {\n    /**\n     * @param {Object} params A tuple: (ATN state, predicted alt, syntactic, semantic context).\n     * The syntactic context is a graph-structured stack node whose\n     * path(s) to the root is the rule invocation(s)\n     * chain used to arrive at the state.  The semantic context is\n     * the tree of semantic predicates encountered before reaching\n     * an ATN state\n     */\n    constructor(params, config) {\n        this.checkContext(params, config);\n        params = checkParams(params);\n        config = checkParams(config, true);\n        // The ATN state associated with this configuration///\n        this.state = params.state!==null ? params.state : config.state;\n        // What alt (or lexer rule) is predicted by this configuration///\n        this.alt = params.alt!==null ? params.alt : config.alt;\n        /**\n         * The stack of invoking states leading to the rule/states associated\n         * with this config.  We track only those contexts pushed during\n         * execution of the ATN simulator\n         */\n        this.context = params.context!==null ? params.context : config.context;\n        this.semanticContext = params.semanticContext!==null ? params.semanticContext :\n            (config.semanticContext!==null ? config.semanticContext : SemanticContext.NONE);\n        // TODO: make it a boolean then\n        /**\n         * We cannot execute predicates dependent upon local context unless\n         * we know for sure we are in the correct context. Because there is\n         * no way to do this efficiently, we simply cannot evaluate\n         * dependent predicates unless we are in the rule that initially\n         * invokes the ATN simulator.\n         * closure() tracks the depth of how far we dip into the\n         * outer context: depth &gt; 0.  Note that it may not be totally\n         * accurate depth since I don't ever decrement\n         */\n        this.reachesIntoOuterContext = config.reachesIntoOuterContext;\n        this.precedenceFilterSuppressed = config.precedenceFilterSuppressed;\n    }\n\n    checkContext(params, config) {\n        if((params.context===null || params.context===undefined) &&\n                (config===null || config.context===null || config.context===undefined)) {\n            this.context = null;\n        }\n    }\n\n    hashCode() {\n        const hash = new HashCode();\n        this.updateHashCode(hash);\n        return hash.finish();\n    }\n\n    updateHashCode(hash) {\n        hash.update(this.state.stateNumber, this.alt, this.context, this.semanticContext);\n    }\n\n    /**\n     * An ATN configuration is equal to another if both have\n     * the same state, they predict the same alternative, and\n     * syntactic/semantic contexts are the same\n     */\n    equals(other) {\n        if (this === other) {\n            return true;\n        } else if (! (other instanceof ATNConfig)) {\n            return false;\n        } else {\n            return this.state.stateNumber===other.state.stateNumber &&\n                this.alt===other.alt &&\n                (this.context===null ? other.context===null : this.context.equals(other.context)) &&\n                this.semanticContext.equals(other.semanticContext) &&\n                this.precedenceFilterSuppressed===other.precedenceFilterSuppressed;\n        }\n    }\n\n    hashCodeForConfigSet() {\n        const hash = new HashCode();\n        hash.update(this.state.stateNumber, this.alt, this.semanticContext);\n        return hash.finish();\n    }\n\n    equalsForConfigSet(other) {\n        if (this === other) {\n            return true;\n        } else if (! (other instanceof ATNConfig)) {\n            return false;\n        } else {\n            return this.state.stateNumber===other.state.stateNumber &&\n                this.alt===other.alt &&\n                this.semanticContext.equals(other.semanticContext);\n        }\n    }\n\n    toString() {\n        return \"(\" + this.state + \",\" + this.alt +\n            (this.context!==null ? \",[\" + this.context.toString() + \"]\" : \"\") +\n            (this.semanticContext !== SemanticContext.NONE ?\n                    (\",\" + this.semanticContext.toString())\n                    : \"\") +\n            (this.reachesIntoOuterContext>0 ?\n                    (\",up=\" + this.reachesIntoOuterContext)\n                    : \"\") + \")\";\n    }\n}\n","/* Copyright (c) 2012-2022 The ANTLR Project Contributors. All rights reserved.\n * Use is of this file is governed by the BSD 3-clause license that\n * can be found in the LICENSE.txt file in the project root.\n */\n/* stop is not included! */\nexport default class Interval {\n\n    constructor(start, stop) {\n        this.start = start;\n        this.stop = stop;\n    }\n\n    clone() {\n        return new Interval(this.start, this.stop);\n    }\n\n    contains(item) {\n        return item >= this.start && item < this.stop;\n    }\n\n    toString() {\n        if(this.start===this.stop-1) {\n            return this.start.toString();\n        } else {\n            return this.start.toString() + \"..\" + (this.stop-1).toString();\n        }\n    }\n\n    get length(){\n        return this.stop - this.start;\n    }\n}\n\nInterval.INVALID_INTERVAL = new Interval(-1, -2);\n\n","/* Copyright (c) 2012-2022 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause license that\n * can be found in the LICENSE.txt file in the project root.\n */\n\nimport Token from '../Token.js';\nimport Interval from \"./Interval.js\";\n\nexport default class IntervalSet {\n\tconstructor() {\n\t\tthis.intervals = null;\n\t\tthis.readOnly = false;\n\t}\n\n\tfirst(v) {\n\t\tif (this.intervals === null || this.intervals.length===0) {\n\t\t\treturn Token.INVALID_TYPE;\n\t\t} else {\n\t\t\treturn this.intervals[0].start;\n\t\t}\n\t}\n\n\taddOne(v) {\n\t\tthis.addInterval(new Interval(v, v + 1));\n\t}\n\n\taddRange(l, h) {\n\t\tthis.addInterval(new Interval(l, h + 1));\n\t}\n\n\taddInterval(toAdd) {\n\t\tif (this.intervals === null) {\n\t\t\tthis.intervals = [];\n\t\t\tthis.intervals.push(toAdd.clone());\n\t\t} else {\n\t\t\t// find insert pos\n\t\t\tfor (let pos = 0; pos < this.intervals.length; pos++) {\n\t\t\t\tconst existing = this.intervals[pos];\n\t\t\t\t// distinct range -> insert\n\t\t\t\tif (toAdd.stop < existing.start) {\n\t\t\t\t\tthis.intervals.splice(pos, 0, toAdd);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t// contiguous range -> adjust\n\t\t\t\telse if (toAdd.stop === existing.start) {\n\t\t\t\t\tthis.intervals[pos] = new Interval(toAdd.start, existing.stop)\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t// overlapping range -> adjust and reduce\n\t\t\t\telse if (toAdd.start <= existing.stop) {\n\t\t\t\t\tthis.intervals[pos] = new Interval(Math.min(existing.start, toAdd.start), Math.max(existing.stop, toAdd.stop));\n\t\t\t\t\tthis.reduce(pos);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// greater than any existing\n\t\t\tthis.intervals.push(toAdd.clone());\n\t\t}\n\t}\n\n\taddSet(other) {\n\t\tif (other.intervals !== null) {\n\t\t\tother.intervals.forEach( toAdd => this.addInterval(toAdd), this);\n\t\t}\n\t\treturn this;\n\t}\n\n\treduce(pos) {\n\t\t// only need to reduce if pos is not the last\n\t\tif (pos < this.intervals.length - 1) {\n\t\t\tconst current = this.intervals[pos];\n\t\t\tconst next = this.intervals[pos + 1];\n\t\t\t// if next contained in current\n\t\t\tif (current.stop >= next.stop) {\n\t\t\t\tthis.intervals.splice(pos + 1, 1);\n\t\t\t\tthis.reduce(pos);\n\t\t\t} else if (current.stop >= next.start) {\n\t\t\t\tthis.intervals[pos] = new Interval(current.start, next.stop);\n\t\t\t\tthis.intervals.splice(pos + 1, 1);\n\t\t\t}\n\t\t}\n\t}\n\n\tcomplement(start, stop) {\n\t\tconst result = new IntervalSet();\n\t\tresult.addInterval(new Interval(start, stop + 1));\n\t\tif(this.intervals !== null)\n\t\t\tthis.intervals.forEach(toRemove => result.removeRange(toRemove));\n\t\treturn result;\n\t}\n\n\tcontains(item) {\n\t\tif (this.intervals === null) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\tfor (let k = 0; k < this.intervals.length; k++) {\n\t\t\t\tif(this.intervals[k].contains(item)) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t}\n\n\tremoveRange(toRemove) {\n\t\tif(toRemove.start===toRemove.stop-1) {\n\t\t\tthis.removeOne(toRemove.start);\n\t\t} else if (this.intervals !== null) {\n\t\t\tlet pos = 0;\n\t\t\tfor(let n=0; n<this.intervals.length; n++) {\n\t\t\t\tconst existing = this.intervals[pos];\n\t\t\t\t// intervals are ordered\n\t\t\t\tif (toRemove.stop<=existing.start) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t// check for including range, split it\n\t\t\t\telse if(toRemove.start>existing.start && toRemove.stop<existing.stop) {\n\t\t\t\t\tthis.intervals[pos] = new Interval(existing.start, toRemove.start);\n\t\t\t\t\tconst x = new Interval(toRemove.stop, existing.stop);\n\t\t\t\t\tthis.intervals.splice(pos, 0, x);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t// check for included range, remove it\n\t\t\t\telse if(toRemove.start<=existing.start && toRemove.stop>=existing.stop) {\n\t\t\t\t\tthis.intervals.splice(pos, 1);\n\t\t\t\t\tpos = pos - 1; // need another pass\n\t\t\t\t}\n\t\t\t\t// check for lower boundary\n\t\t\t\telse if(toRemove.start<existing.stop) {\n\t\t\t\t\tthis.intervals[pos] = new Interval(existing.start, toRemove.start);\n\t\t\t\t}\n\t\t\t\t// check for upper boundary\n\t\t\t\telse if(toRemove.stop<existing.stop) {\n\t\t\t\t\tthis.intervals[pos] = new Interval(toRemove.stop, existing.stop);\n\t\t\t\t}\n\t\t\t\tpos += 1;\n\t\t\t}\n\t\t}\n\t}\n\n\tremoveOne(value) {\n\t\tif (this.intervals !== null) {\n\t\t\tfor (let i = 0; i < this.intervals.length; i++) {\n\t\t\t\tconst existing = this.intervals[i];\n\t\t\t\t// intervals are ordered\n\t\t\t\tif (value < existing.start) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t// check for single value range\n\t\t\t\telse if (value === existing.start && value === existing.stop - 1) {\n\t\t\t\t\tthis.intervals.splice(i, 1);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t// check for lower boundary\n\t\t\t\telse if (value === existing.start) {\n\t\t\t\t\tthis.intervals[i] = new Interval(existing.start + 1, existing.stop);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t// check for upper boundary\n\t\t\t\telse if (value === existing.stop - 1) {\n\t\t\t\t\tthis.intervals[i] = new Interval(existing.start, existing.stop - 1);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t// split existing range\n\t\t\t\telse if (value < existing.stop - 1) {\n\t\t\t\t\tconst replace = new Interval(existing.start, value);\n\t\t\t\t\texisting.start = value + 1;\n\t\t\t\t\tthis.intervals.splice(i, 0, replace);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\ttoString(literalNames, symbolicNames, elemsAreChar) {\n\t\tliteralNames = literalNames || null;\n\t\tsymbolicNames = symbolicNames || null;\n\t\telemsAreChar = elemsAreChar || false;\n\t\tif (this.intervals === null) {\n\t\t\treturn \"{}\";\n\t\t} else if(literalNames!==null || symbolicNames!==null) {\n\t\t\treturn this.toTokenString(literalNames, symbolicNames);\n\t\t} else if(elemsAreChar) {\n\t\t\treturn this.toCharString();\n\t\t} else {\n\t\t\treturn this.toIndexString();\n\t\t}\n\t}\n\n\ttoCharString() {\n\t\tconst names = [];\n\t\tfor (let i = 0; i < this.intervals.length; i++) {\n\t\t\tconst existing = this.intervals[i];\n\t\t\tif(existing.stop===existing.start+1) {\n\t\t\t\tif ( existing.start===Token.EOF ) {\n\t\t\t\t\tnames.push(\"<EOF>\");\n\t\t\t\t} else {\n\t\t\t\t\tnames.push(\"'\" + String.fromCharCode(existing.start) + \"'\");\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tnames.push(\"'\" + String.fromCharCode(existing.start) + \"'..'\" + String.fromCharCode(existing.stop-1) + \"'\");\n\t\t\t}\n\t\t}\n\t\tif (names.length > 1) {\n\t\t\treturn \"{\" + names.join(\", \") + \"}\";\n\t\t} else {\n\t\t\treturn names[0];\n\t\t}\n\t}\n\n\ttoIndexString() {\n\t\tconst names = [];\n\t\tfor (let i = 0; i < this.intervals.length; i++) {\n\t\t\tconst existing = this.intervals[i];\n\t\t\tif(existing.stop===existing.start+1) {\n\t\t\t\tif ( existing.start===Token.EOF ) {\n\t\t\t\t\tnames.push(\"<EOF>\");\n\t\t\t\t} else {\n\t\t\t\t\tnames.push(existing.start.toString());\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tnames.push(existing.start.toString() + \"..\" + (existing.stop-1).toString());\n\t\t\t}\n\t\t}\n\t\tif (names.length > 1) {\n\t\t\treturn \"{\" + names.join(\", \") + \"}\";\n\t\t} else {\n\t\t\treturn names[0];\n\t\t}\n\t}\n\n\ttoTokenString(literalNames, symbolicNames) {\n\t\tconst names = [];\n\t\tfor (let i = 0; i < this.intervals.length; i++) {\n\t\t\tconst existing = this.intervals[i];\n\t\t\tfor (let j = existing.start; j < existing.stop; j++) {\n\t\t\t\tnames.push(this.elementName(literalNames, symbolicNames, j));\n\t\t\t}\n\t\t}\n\t\tif (names.length > 1) {\n\t\t\treturn \"{\" + names.join(\", \") + \"}\";\n\t\t} else {\n\t\t\treturn names[0];\n\t\t}\n\t}\n\n\telementName(literalNames, symbolicNames, token) {\n\t\tif (token === Token.EOF) {\n\t\t\treturn \"<EOF>\";\n\t\t} else if (token === Token.EPSILON) {\n\t\t\treturn \"<EPSILON>\";\n\t\t} else {\n\t\t\treturn literalNames[token] || symbolicNames[token];\n\t\t}\n\t}\n\n\tget length(){\n\t\treturn this.intervals.map( interval => interval.length ).reduce((acc, val) => acc + val);\n\t}\n}\n","/* Copyright (c) 2012-2022 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause license that\n * can be found in the LICENSE.txt file in the project root.\n */\n\n/**\n * The following images show the relation of states and\n * {@link ATNState//transitions} for various grammar constructs.\n *\n * <ul>\n *\n * <li>Solid edges marked with an &//0949; indicate a required\n * {@link EpsilonTransition}.</li>\n *\n * <li>Dashed edges indicate locations where any transition derived from\n * {@link Transition} might appear.</li>\n *\n * <li>Dashed nodes are place holders for either a sequence of linked\n * {@link BasicState} states or the inclusion of a block representing a nested\n * construct in one of the forms below.</li>\n *\n * <li>Nodes showing multiple outgoing alternatives with a {@code ...} support\n * any number of alternatives (one or more). Nodes without the {@code ...} only\n * support the exact number of alternatives shown in the diagram.</li>\n *\n * </ul>\n *\n * <h2>Basic Blocks</h2>\n *\n * <h3>Rule</h3>\n *\n * <embed src=\"images/Rule.svg\" type=\"image/svg+xml\"/>\n *\n * <h3>Block of 1 or more alternatives</h3>\n *\n * <embed src=\"images/Block.svg\" type=\"image/svg+xml\"/>\n *\n * <h2>Greedy Loops</h2>\n *\n * <h3>Greedy Closure: {@code (...)*}</h3>\n *\n * <embed src=\"images/ClosureGreedy.svg\" type=\"image/svg+xml\"/>\n *\n * <h3>Greedy Positive Closure: {@code (...)+}</h3>\n *\n * <embed src=\"images/PositiveClosureGreedy.svg\" type=\"image/svg+xml\"/>\n *\n * <h3>Greedy Optional: {@code (...)?}</h3>\n *\n * <embed src=\"images/OptionalGreedy.svg\" type=\"image/svg+xml\"/>\n *\n * <h2>Non-Greedy Loops</h2>\n *\n * <h3>Non-Greedy Closure: {@code (...)*?}</h3>\n *\n * <embed src=\"images/ClosureNonGreedy.svg\" type=\"image/svg+xml\"/>\n *\n * <h3>Non-Greedy Positive Closure: {@code (...)+?}</h3>\n *\n * <embed src=\"images/PositiveClosureNonGreedy.svg\" type=\"image/svg+xml\"/>\n *\n * <h3>Non-Greedy Optional: {@code (...)??}</h3>\n *\n * <embed src=\"images/OptionalNonGreedy.svg\" type=\"image/svg+xml\"/>\n */\nexport default class ATNState {\n    constructor() {\n        // Which ATN are we in?\n        this.atn = null;\n        this.stateNumber = ATNState.INVALID_STATE_NUMBER;\n        this.stateType = null;\n        this.ruleIndex = 0; // at runtime, we don't have Rule objects\n        this.epsilonOnlyTransitions = false;\n        // Track the transitions emanating from this ATN state.\n        this.transitions = [];\n        // Used to cache lookahead during parsing, not used during construction\n        this.nextTokenWithinRule = null;\n    }\n\n    toString() {\n        return this.stateNumber;\n    }\n\n    equals(other) {\n        if (other instanceof ATNState) {\n            return this.stateNumber===other.stateNumber;\n        } else {\n            return false;\n        }\n    }\n\n    isNonGreedyExitState() {\n        return false;\n    }\n\n    addTransition(trans, index) {\n        if(index===undefined) {\n            index = -1;\n        }\n        if (this.transitions.length===0) {\n            this.epsilonOnlyTransitions = trans.isEpsilon;\n        } else if(this.epsilonOnlyTransitions !== trans.isEpsilon) {\n            this.epsilonOnlyTransitions = false;\n        }\n        if (index===-1) {\n            this.transitions.push(trans);\n        } else {\n            this.transitions.splice(index, 1, trans);\n        }\n    }\n}\n\n// constants for serialization\nATNState.INVALID_TYPE = 0;\nATNState.BASIC = 1;\nATNState.RULE_START = 2;\nATNState.BLOCK_START = 3;\nATNState.PLUS_BLOCK_START = 4;\nATNState.STAR_BLOCK_START = 5;\nATNState.TOKEN_START = 6;\nATNState.RULE_STOP = 7;\nATNState.BLOCK_END = 8;\nATNState.STAR_LOOP_BACK = 9;\nATNState.STAR_LOOP_ENTRY = 10;\nATNState.PLUS_LOOP_BACK = 11;\nATNState.LOOP_END = 12;\n\nATNState.serializationNames = [\n            \"INVALID\",\n            \"BASIC\",\n            \"RULE_START\",\n            \"BLOCK_START\",\n            \"PLUS_BLOCK_START\",\n            \"STAR_BLOCK_START\",\n            \"TOKEN_START\",\n            \"RULE_STOP\",\n            \"BLOCK_END\",\n            \"STAR_LOOP_BACK\",\n            \"STAR_LOOP_ENTRY\",\n            \"PLUS_LOOP_BACK\",\n            \"LOOP_END\" ];\n\nATNState.INVALID_STATE_NUMBER = -1;\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n","/* Copyright (c) 2012-2022 The ANTLR Project Contributors. All rights reserved.\n * Use is of this file is governed by the BSD 3-clause license that\n * can be found in the LICENSE.txt file in the project root.\n */\nimport ATNState from \"./ATNState.js\";\n\n/**\n * The last node in the ATN for a rule, unless that rule is the start symbol.\n * In that case, there is one transition to EOF. Later, we might encode\n * references to all calls to this rule to compute FOLLOW sets for\n * error handling\n */\nexport default class RuleStopState extends ATNState {\n    constructor() {\n        super();\n        this.stateType = ATNState.RULE_STOP;\n        return this;\n    }\n}\n","/* Copyright (c) 2012-2022 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause license that\n * can be found in the LICENSE.txt file in the project root.\n */\n\n/**\n * An ATN transition between any two ATN states.  Subclasses define\n * atom, set, epsilon, action, predicate, rule transitions.\n *\n * <p>This is a one way link.  It emanates from a state (usually via a list of\n * transitions) and has a target state.</p>\n *\n * <p>Since we never have to change the ATN transitions once we construct it,\n * we can fix these transitions as specific classes. The DFA transitions\n * on the other hand need to update the labels as it adds transitions to\n * the states. We'll use the term Edge for the DFA to distinguish them from\n * ATN transitions.</p>\n */\nexport default class Transition {\n    constructor(target) {\n        // The target of this transition.\n        if (target===undefined || target===null) {\n            throw \"target cannot be null.\";\n        }\n        this.target = target;\n        // Are we epsilon, action, sempred?\n        this.isEpsilon = false;\n        this.label = null;\n    }\n}\n\n// constants for serialization\n\nTransition.EPSILON = 1;\nTransition.RANGE = 2;\nTransition.RULE = 3;\n// e.g., {isType(input.LT(1))}?\nTransition.PREDICATE = 4;\nTransition.ATOM = 5;\nTransition.ACTION = 6;\n// ~(A|B) or ~atom, wildcard, which convert to next 2\nTransition.SET = 7;\nTransition.NOT_SET = 8;\nTransition.WILDCARD = 9;\nTransition.PRECEDENCE = 10;\n\nTransition.serializationNames = [\n            \"INVALID\",\n            \"EPSILON\",\n            \"RANGE\",\n            \"RULE\",\n            \"PREDICATE\",\n            \"ATOM\",\n            \"ACTION\",\n            \"SET\",\n            \"NOT_SET\",\n            \"WILDCARD\",\n            \"PRECEDENCE\"\n        ];\n\nTransition.serializationTypes = {\n        EpsilonTransition: Transition.EPSILON,\n        RangeTransition: Transition.RANGE,\n        RuleTransition: Transition.RULE,\n        PredicateTransition: Transition.PREDICATE,\n        AtomTransition: Transition.ATOM,\n        ActionTransition: Transition.ACTION,\n        SetTransition: Transition.SET,\n        NotSetTransition: Transition.NOT_SET,\n        WildcardTransition: Transition.WILDCARD,\n        PrecedencePredicateTransition: Transition.PRECEDENCE\n    };\n\n","/* Copyright (c) 2012-2022 The ANTLR Project Contributors. All rights reserved.\n * Use is of this file is governed by the BSD 3-clause license that\n * can be found in the LICENSE.txt file in the project root.\n */\nimport Transition from \"./Transition.js\";\n\nexport default class RuleTransition extends Transition {\n    constructor(ruleStart, ruleIndex, precedence, followState) {\n        super(ruleStart);\n        // ptr to the rule definition object for this rule ref\n        this.ruleIndex = ruleIndex;\n        this.precedence = precedence;\n        // what node to begin computations following ref to rule\n        this.followState = followState;\n        this.serializationType = Transition.RULE;\n        this.isEpsilon = true;\n    }\n\n    matches(symbol, minVocabSymbol, maxVocabSymbol) {\n        return false;\n    }\n}\n\n","/* Copyright (c) 2012-2022 The ANTLR Project Contributors. All rights reserved.\n * Use is of this file is governed by the BSD 3-clause license that\n * can be found in the LICENSE.txt file in the project root.\n */\n// A transition containing a set of values.\nimport IntervalSet from \"../misc/IntervalSet.js\";\nimport Token from '../Token.js';\nimport Transition from \"./Transition.js\";\n\nexport default class SetTransition extends Transition {\n    constructor(target, set) {\n        super(target);\n        this.serializationType = Transition.SET;\n        if (set !==undefined && set !==null) {\n            this.label = set;\n        } else {\n            this.label = new IntervalSet();\n            this.label.addOne(Token.INVALID_TYPE);\n        }\n    }\n\n    matches(symbol, minVocabSymbol, maxVocabSymbol) {\n        return this.label.contains(symbol);\n    }\n\n    toString() {\n        return this.label.toString();\n    }\n}\n","/* Copyright (c) 2012-2022 The ANTLR Project Contributors. All rights reserved.\n * Use is of this file is governed by the BSD 3-clause license that\n * can be found in the LICENSE.txt file in the project root.\n */\nimport Transition from \"./Transition.js\";\nimport SetTransition from \"./SetTransition.js\";\n\nexport default class NotSetTransition extends SetTransition {\n    constructor(target, set) {\n        super(target, set);\n        this.serializationType = Transition.NOT_SET;\n    }\n\n    matches(symbol, minVocabSymbol, maxVocabSymbol) {\n        return symbol >= minVocabSymbol && symbol <= maxVocabSymbol &&\n            !super.matches(symbol, minVocabSymbol, maxVocabSymbol);\n    }\n\n    toString() {\n        return '~' + super.toString();\n    }\n}\n","/* Copyright (c) 2012-2022 The ANTLR Project Contributors. All rights reserved.\n * Use is of this file is governed by the BSD 3-clause license that\n * can be found in the LICENSE.txt file in the project root.\n */\nimport Transition from \"./Transition.js\";\n\nexport default class WildcardTransition extends Transition {\n    constructor(target) {\n        super(target);\n        this.serializationType = Transition.WILDCARD;\n    }\n\n    matches(symbol, minVocabSymbol, maxVocabSymbol) {\n        return symbol >= minVocabSymbol && symbol <= maxVocabSymbol;\n    }\n\n    toString() {\n        return \".\";\n    }\n}\n","/* Copyright (c) 2012-2022 The ANTLR Project Contributors. All rights reserved.\n * Use is of this file is governed by the BSD 3-clause license that\n * can be found in the LICENSE.txt file in the project root.\n */\nimport Transition from \"../transition/Transition.js\";\n\nexport default class AbstractPredicateTransition extends Transition {\n    constructor(target) {\n        super(target);\n    }\n}\n","/* Copyright (c) 2012-2022 The ANTLR Project Contributors. All rights reserved.\n * Use is of this file is governed by the BSD 3-clause license that\n * can be found in the LICENSE.txt file in the project root.\n */\nimport SyntaxTree from \"./SyntaxTree.js\";\n\nexport default class ParseTree extends SyntaxTree {\n}\n","/* Copyright (c) 2012-2022 The ANTLR Project Contributors. All rights reserved.\n * Use is of this file is governed by the BSD 3-clause license that\n * can be found in the LICENSE.txt file in the project root.\n */\nimport Tree from \"./Tree.js\";\n\nexport default class SyntaxTree extends Tree {\n}\n","/* Copyright (c) 2012-2022 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause license that\n * can be found in the LICENSE.txt file in the project root.\n */\n\n/**\n * The basic notion of a tree has a parent, a payload, and a list of children.\n * It is the most abstract interface for all the trees used by ANTLR.\n */\nexport default class Tree {}\n\n","/* Copyright (c) 2012-2022 The ANTLR Project Contributors. All rights reserved.\n * Use is of this file is governed by the BSD 3-clause license that\n * can be found in the LICENSE.txt file in the project root.\n */\nimport ParseTree from \"./ParseTree.js\";\n\nexport default class RuleNode extends ParseTree {\n\n    get ruleContext() {\n        throw new Error(\"missing interface implementation\")\n    }\n}\n","/* Copyright (c) 2012-2022 The ANTLR Project Contributors. All rights reserved.\n * Use is of this file is governed by the BSD 3-clause license that\n * can be found in the LICENSE.txt file in the project root.\n */\nimport ParseTree from \"./ParseTree.js\";\n\nexport default class TerminalNode extends ParseTree {\n}\n","/* Copyright (c) 2012-2022 The ANTLR Project Contributors. All rights reserved.\n * Use is of this file is governed by the BSD 3-clause license that\n * can be found in the LICENSE.txt file in the project root.\n */\nimport TerminalNode from \"./TerminalNode.js\";\n\nexport default class ErrorNode extends TerminalNode {\n}\n","/* Copyright (c) 2012-2022 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause license that\n * can be found in the LICENSE.txt file in the project root.\n */\n\nimport Token from '../Token.js';\nimport ErrorNode from './ErrorNode.js';\nimport TerminalNode from './TerminalNode.js';\nimport RuleNode from './RuleNode.js';\nimport escapeWhitespace from \"../utils/escapeWhitespace.js\";\n\n/** A set of utility routines useful for all kinds of ANTLR trees. */\nconst Trees = {\n    /**\n     * Print out a whole tree in LISP form. {@link //getNodeText} is used on the\n     *  node payloads to get the text for the nodes.  Detect\n     *  parse trees and extract data appropriately.\n     */\n    toStringTree: function(tree, ruleNames, recog) {\n        ruleNames = ruleNames || null;\n        recog = recog || null;\n        if(recog!==null) {\n            ruleNames = recog.ruleNames;\n        }\n        let s = Trees.getNodeText(tree, ruleNames);\n        s = escapeWhitespace(s, false);\n        const c = tree.getChildCount();\n        if(c===0) {\n            return s;\n        }\n        let res = \"(\" + s + ' ';\n        if(c>0) {\n            s = Trees.toStringTree(tree.getChild(0), ruleNames);\n            res = res.concat(s);\n        }\n        for(let i=1;i<c;i++) {\n            s = Trees.toStringTree(tree.getChild(i), ruleNames);\n            res = res.concat(' ' + s);\n        }\n        res = res.concat(\")\");\n        return res;\n    },\n\n    getNodeText: function(t, ruleNames, recog) {\n        ruleNames = ruleNames || null;\n        recog = recog || null;\n        if(recog!==null) {\n            ruleNames = recog.ruleNames;\n        }\n        if(ruleNames!==null) {\n            if (t instanceof RuleNode) {\n                const context = t.ruleContext;\n                const altNumber = context.getAltNumber();\n                // use const value of ATN.INVALID_ALT_NUMBER to avoid circular dependency\n                if ( altNumber != 0 ) {\n                    return ruleNames[t.ruleIndex]+\":\"+altNumber;\n                }\n                return ruleNames[t.ruleIndex];\n            } else if ( t instanceof ErrorNode) {\n                return t.toString();\n            } else if(t instanceof TerminalNode) {\n                if(t.symbol!==null) {\n                    return t.symbol.text;\n                }\n            }\n        }\n        // no recog for rule names\n        const payload = t.getPayload();\n        if (payload instanceof Token ) {\n            return payload.text;\n        }\n        return t.getPayload().toString();\n    },\n\n    /**\n     * Return ordered list of all children of this node\n     */\n    getChildren: function(t) {\n        const list = [];\n        for(let i=0;i<t.getChildCount();i++) {\n            list.push(t.getChild(i));\n        }\n        return list;\n    },\n\n    /**\n     * Return a list of all ancestors of this node.  The first node of\n     * list is the root and the last is the parent of this node.\n     */\n    getAncestors: function(t) {\n        let ancestors = [];\n        t = t.getParent();\n        while(t!==null) {\n            ancestors = [t].concat(ancestors);\n            t = t.getParent();\n        }\n        return ancestors;\n    },\n\n    findAllTokenNodes: function(t, ttype) {\n        return Trees.findAllNodes(t, ttype, true);\n    },\n\n    findAllRuleNodes: function(t, ruleIndex) {\n        return Trees.findAllNodes(t, ruleIndex, false);\n    },\n\n    findAllNodes: function(t, index, findTokens) {\n        const nodes = [];\n        Trees._findAllNodes(t, index, findTokens, nodes);\n        return nodes;\n    },\n\n    _findAllNodes: function(t, index, findTokens, nodes) {\n        // check this node (the root) first\n        if(findTokens && (t instanceof TerminalNode)) {\n            if(t.symbol.type===index) {\n                nodes.push(t);\n            }\n        } else if(!findTokens && (t instanceof RuleNode)) {\n            if(t.ruleIndex===index) {\n                nodes.push(t);\n            }\n        }\n        // check children\n        for(let i=0;i<t.getChildCount();i++) {\n            Trees._findAllNodes(t.getChild(i), index, findTokens, nodes);\n        }\n    },\n\n    descendants: function(t) {\n        let nodes = [t];\n        for(let i=0;i<t.getChildCount();i++) {\n            nodes = nodes.concat(Trees.descendants(t.getChild(i)));\n        }\n        return nodes;\n    }\n}\n\nexport default Trees;\n","/* Copyright (c) 2012-2022 The ANTLR Project Contributors. All rights reserved.\n * Use is of this file is governed by the BSD 3-clause license that\n * can be found in the LICENSE.txt file in the project root.\n */\nexport default function escapeWhitespace(s, escapeSpaces) {\n    s = s.replace(/\\t/g, \"\\\\t\")\n        .replace(/\\n/g, \"\\\\n\")\n        .replace(/\\r/g, \"\\\\r\");\n    if (escapeSpaces) {\n        s = s.replace(/ /g, \"\\u00B7\");\n    }\n    return s;\n}\n","/* Copyright (c) 2012-2022 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause license that\n * can be found in the LICENSE.txt file in the project root.\n */\n\nimport RuleNode from '../tree/RuleNode.js';\nimport Interval from '../misc/Interval.js';\nimport Trees from '../tree/Trees.js';\n\nexport default class RuleContext extends RuleNode {\n    /** A rule context is a record of a single rule invocation. It knows\n     * which context invoked it, if any. If there is no parent context, then\n     * naturally the invoking state is not valid.  The parent link\n     * provides a chain upwards from the current rule invocation to the root\n     * of the invocation tree, forming a stack. We actually carry no\n     * information about the rule associated with this context (except\n     * when parsing). We keep only the state number of the invoking state from\n     * the ATN submachine that invoked this. Contrast this with the s\n     * pointer inside ParserRuleContext that tracks the current state\n     * being \"executed\" for the current rule.\n     *\n     * The parent contexts are useful for computing lookahead sets and\n     * getting error information.\n     *\n     * These objects are used during parsing and prediction.\n     * For the special case of parsers, we use the subclass\n     * ParserRuleContext.\n     *\n     * @see ParserRuleContext\n     */\n    constructor(parent, invokingState) {\n        // What context invoked this rule?\n        super();\n        this.parentCtx = parent || null;\n        /**\n         * What state invoked the rule associated with this context?\n         * The \"return address\" is the followState of invokingState\n         * If parent is null, this should be -1.\n         */\n        this.invokingState = invokingState || -1;\n    }\n\n    depth() {\n        let n = 0;\n        let p = this;\n        while (p !== null) {\n            p = p.parentCtx;\n            n += 1;\n        }\n        return n;\n    }\n\n    /**\n     * A context is empty if there is no invoking state; meaning nobody call\n     * current context.\n     */\n    isEmpty() {\n        return this.invokingState === -1;\n    }\n\n// satisfy the ParseTree / SyntaxTree interface\n    getSourceInterval() {\n        return Interval.INVALID_INTERVAL;\n    }\n\n    get ruleContext() {\n        return this;\n    }\n\n    getPayload() {\n        return this;\n    }\n\n    /**\n     * Return the combined text of all child nodes. This method only considers\n     * tokens which have been added to the parse tree.\n     * <p>\n     * Since tokens on hidden channels (e.g. whitespace or comments) are not\n     * added to the parse trees, they will not appear in the output of this\n     * method.\n     */\n    getText() {\n        if (this.getChildCount() === 0) {\n            return \"\";\n        } else {\n            return this.children.map(function (child) {\n                return child.getText();\n            }).join(\"\");\n        }\n    }\n\n    /**\n     * For rule associated with this parse tree internal node, return\n     * the outer alternative number used to match the input. Default\n     * implementation does not compute nor store this alt num. Create\n     * a subclass of ParserRuleContext with backing field and set\n     * option contextSuperClass.\n     * to set it.\n     */\n    getAltNumber() {\n        // use constant value of ATN.INVALID_ALT_NUMBER to avoid circular dependency\n        return 0;\n    }\n\n    /**\n     * Set the outer alternative number for this context node. Default\n     * implementation does nothing to avoid backing field overhead for\n     * trees that don't need it.  Create\n     * a subclass of ParserRuleContext with backing field and set\n     * option contextSuperClass.\n     */\n    setAltNumber(altNumber) {\n    }\n\n    getChild(i) {\n        return null;\n    }\n\n    getChildCount() {\n        return 0;\n    }\n\n    accept(visitor) {\n        return visitor.visitChildren(this);\n    }\n\n    /**\n     * Print out a whole tree, not just a node, in LISP format\n     * (root child1 .. childN). Print just a node if this is a leaf.\n     */\n    toStringTree(ruleNames, recog) {\n        return Trees.toStringTree(this, ruleNames, recog);\n    }\n\n    toString(ruleNames, stop) {\n        ruleNames = ruleNames || null;\n        stop = stop || null;\n        let p = this;\n        let s = \"[\";\n        while (p !== null && p !== stop) {\n            if (ruleNames === null) {\n                if (!p.isEmpty()) {\n                    s += p.invokingState;\n                }\n            } else {\n                const ri = p.ruleIndex;\n                const ruleName = (ri >= 0 && ri < ruleNames.length) ? ruleNames[ri]\n                    : \"\" + ri;\n                s += ruleName;\n            }\n            if (p.parentCtx !== null && (ruleNames !== null || !p.parentCtx.isEmpty())) {\n                s += \" \";\n            }\n            p = p.parentCtx;\n        }\n        s += \"]\";\n        return s;\n    }\n}\n","/* Copyright (c) 2012-2022 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause license that\n * can be found in the LICENSE.txt file in the project root.\n */\n\nexport default class PredictionContext {\n\n\tconstructor(cachedHashCode) {\n\t\tthis.cachedHashCode = cachedHashCode;\n\t}\n\n\t/**\n\t * Stores the computed hash code of this {@link PredictionContext}. The hash\n\t * code is computed in parts to match the following reference algorithm.\n\t *\n\t * <pre>\n\t * private int referenceHashCode() {\n\t * int hash = {@link MurmurHash//initialize MurmurHash.initialize}({@link\n\t * //INITIAL_HASH});\n\t *\n\t * for (int i = 0; i &lt; {@link //size()}; i++) {\n\t * hash = {@link MurmurHash//update MurmurHash.update}(hash, {@link //getParent\n\t * getParent}(i));\n\t * }\n\t *\n\t * for (int i = 0; i &lt; {@link //size()}; i++) {\n\t * hash = {@link MurmurHash//update MurmurHash.update}(hash, {@link\n\t * //getReturnState getReturnState}(i));\n\t * }\n\t *\n\t * hash = {@link MurmurHash//finish MurmurHash.finish}(hash, 2// {@link\n\t * //size()});\n\t * return hash;\n\t * }\n\t * </pre>\n\t * This means only the {@link //EMPTY} context is in set.\n\t */\n\tisEmpty() {\n\t\treturn this === PredictionContext.EMPTY;\n\t}\n\n\thasEmptyPath() {\n\t\treturn this.getReturnState(this.length - 1) === PredictionContext.EMPTY_RETURN_STATE;\n\t}\n\n\thashCode() {\n\t\treturn this.cachedHashCode;\n\t}\n\n\tupdateHashCode(hash) {\n\t\thash.update(this.cachedHashCode);\n\t}\n}\n\n/**\n * Represents {@code $} in local context prediction, which means wildcard.\n * {@code//+x =//}.\n */\nPredictionContext.EMPTY = null;\n\n/**\n * Represents {@code $} in an array in full context mode, when {@code $}\n * doesn't mean wildcard: {@code $ + x = [$,x]}. Here,\n * {@code $} = {@link //EMPTY_RETURN_STATE}.\n */\nPredictionContext.EMPTY_RETURN_STATE = 0x7FFFFFFF;\n\nPredictionContext.globalNodeCount = 1;\nPredictionContext.id = PredictionContext.globalNodeCount;\nPredictionContext.trace_atn_sim = false;","/* Copyright (c) 2012-2022 The ANTLR Project Contributors. All rights reserved.\n * Use is of this file is governed by the BSD 3-clause license that\n * can be found in the LICENSE.txt file in the project root.\n */\nimport PredictionContext from \"./PredictionContext.js\";\nimport equalArrays from \"../utils/equalArrays.js\";\nimport HashCode from \"../misc/HashCode.js\";\n\nexport default class ArrayPredictionContext extends PredictionContext {\n\n    constructor(parents, returnStates) {\n        /**\n         * Parent can be null only if full ctx mode and we make an array\n         * from {@link //EMPTY} and non-empty. We merge {@link //EMPTY} by using\n         * null parent and\n         * returnState == {@link //EMPTY_RETURN_STATE}.\n         */\n        const h = new HashCode();\n        h.update(parents, returnStates);\n        const hashCode = h.finish();\n        super(hashCode);\n        this.parents = parents;\n        this.returnStates = returnStates;\n        return this;\n    }\n\n    isEmpty() {\n        // since EMPTY_RETURN_STATE can only appear in the last position, we\n        // don't need to verify that size==1\n        return this.returnStates[0] === PredictionContext.EMPTY_RETURN_STATE;\n    }\n\n    getParent(index) {\n        return this.parents[index];\n    }\n\n    getReturnState(index) {\n        return this.returnStates[index];\n    }\n\n    equals(other) {\n        if (this === other) {\n            return true;\n        } else if (!(other instanceof ArrayPredictionContext)) {\n            return false;\n        } else if (this.hashCode() !== other.hashCode()) {\n            return false; // can't be same if hash is different\n        } else {\n            return equalArrays(this.returnStates, other.returnStates) &&\n                equalArrays(this.parents, other.parents);\n        }\n    }\n\n    toString() {\n        if (this.isEmpty()) {\n            return \"[]\";\n        } else {\n            let s = \"[\";\n            for (let i = 0; i < this.returnStates.length; i++) {\n                if (i > 0) {\n                    s = s + \", \";\n                }\n                if (this.returnStates[i] === PredictionContext.EMPTY_RETURN_STATE) {\n                    s = s + \"$\";\n                    continue;\n                }\n                s = s + this.returnStates[i];\n                if (this.parents[i] !== null) {\n                    s = s + \" \" + this.parents[i];\n                } else {\n                    s = s + \"null\";\n                }\n            }\n            return s + \"]\";\n        }\n    }\n\n    get length(){\n        return this.returnStates.length;\n    }\n}\n\n","/* Copyright (c) 2012-2022 The ANTLR Project Contributors. All rights reserved.\n * Use is of this file is governed by the BSD 3-clause license that\n * can be found in the LICENSE.txt file in the project root.\n */\nimport PredictionContext from './PredictionContext.js';\nimport HashCode from \"../misc/HashCode.js\";\n\nexport default class SingletonPredictionContext extends PredictionContext {\n\n    constructor(parent, returnState) {\n        let hashCode = 0;\n        const hash = new HashCode();\n        if(parent !== null) {\n            hash.update(parent, returnState);\n        } else {\n            hash.update(1);\n        }\n        hashCode = hash.finish();\n        super(hashCode);\n        this.parentCtx = parent;\n        this.returnState = returnState;\n    }\n\n    getParent(index) {\n        return this.parentCtx;\n    }\n\n    getReturnState(index) {\n        return this.returnState;\n    }\n\n    equals(other) {\n        if (this === other) {\n            return true;\n        } else if (!(other instanceof SingletonPredictionContext)) {\n            return false;\n        } else if (this.hashCode() !== other.hashCode()) {\n            return false; // can't be same if hash is different\n        } else {\n            if(this.returnState !== other.returnState)\n                return false;\n            else if(this.parentCtx==null)\n                return other.parentCtx==null\n            else\n                return this.parentCtx.equals(other.parentCtx);\n        }\n    }\n\n    toString() {\n        const up = this.parentCtx === null ? \"\" : this.parentCtx.toString();\n        if (up.length === 0) {\n            if (this.returnState === PredictionContext.EMPTY_RETURN_STATE) {\n                return \"$\";\n            } else {\n                return \"\" + this.returnState;\n            }\n        } else {\n            return \"\" + this.returnState + \" \" + up;\n        }\n    }\n\n    get length(){\n        return 1;\n    }\n\n    static create(parent, returnState) {\n        if (returnState === PredictionContext.EMPTY_RETURN_STATE && parent === null) {\n            // someone can pass in the bits of an array ctx that mean $\n            return PredictionContext.EMPTY;\n        } else {\n            return new SingletonPredictionContext(parent, returnState);\n        }\n    }\n}\n\n","/* Copyright (c) 2012-2022 The ANTLR Project Contributors. All rights reserved.\n * Use is of this file is governed by the BSD 3-clause license that\n * can be found in the LICENSE.txt file in the project root.\n */\nimport PredictionContext from \"./PredictionContext.js\";\nimport SingletonPredictionContext from \"./SingletonPredictionContext.js\";\n\nexport default class EmptyPredictionContext extends SingletonPredictionContext {\n\n    constructor() {\n        super(null, PredictionContext.EMPTY_RETURN_STATE);\n    }\n\n    isEmpty() {\n        return true;\n    }\n\n    getParent(index) {\n        return null;\n    }\n\n    getReturnState(index) {\n        return this.returnState;\n    }\n\n    equals(other) {\n        return this === other;\n    }\n\n    toString() {\n        return \"$\";\n    }\n}\n\n\nPredictionContext.EMPTY = new EmptyPredictionContext();\n","/* Copyright (c) 2012-2022 The ANTLR Project Contributors. All rights reserved.\n * Use is of this file is governed by the BSD 3-clause license that\n * can be found in the LICENSE.txt file in the project root.\n */\nimport standardEqualsFunction from \"../utils/standardEqualsFunction.js\";\nimport standardHashCodeFunction from \"../utils/standardHashCodeFunction.js\";\n\nconst HASH_KEY_PREFIX = \"h-\";\n\nexport default class HashMap {\n\n    constructor(hashFunction, equalsFunction) {\n        this.data = {};\n        this.hashFunction = hashFunction || standardHashCodeFunction;\n        this.equalsFunction = equalsFunction || standardEqualsFunction;\n    }\n\n    set(key, value) {\n        const hashKey = HASH_KEY_PREFIX + this.hashFunction(key);\n        if (hashKey in this.data) {\n            const entries = this.data[hashKey];\n            for (let i = 0; i < entries.length; i++) {\n                const entry = entries[i];\n                if (this.equalsFunction(key, entry.key)) {\n                    const oldValue = entry.value;\n                    entry.value = value;\n                    return oldValue;\n                }\n            }\n            entries.push({key:key, value:value});\n            return value;\n        } else {\n            this.data[hashKey] = [{key:key, value:value}];\n            return value;\n        }\n    }\n\n    containsKey(key) {\n        const hashKey = HASH_KEY_PREFIX + this.hashFunction(key);\n        if(hashKey in this.data) {\n            const entries = this.data[hashKey];\n            for (let i = 0; i < entries.length; i++) {\n                const entry = entries[i];\n                if (this.equalsFunction(key, entry.key))\n                    return true;\n            }\n        }\n        return false;\n    }\n\n    get(key) {\n        const hashKey = HASH_KEY_PREFIX + this.hashFunction(key);\n        if(hashKey in this.data) {\n            const entries = this.data[hashKey];\n            for (let i = 0; i < entries.length; i++) {\n                const entry = entries[i];\n                if (this.equalsFunction(key, entry.key))\n                    return entry.value;\n            }\n        }\n        return null;\n    }\n\n    entries() {\n        return Object.keys(this.data).filter(key => key.startsWith(HASH_KEY_PREFIX)).flatMap(key => this.data[key], this);\n    }\n\n    getKeys() {\n        return this.entries().map(e => e.key);\n    }\n\n    getValues() {\n        return this.entries().map(e => e.value);\n    }\n\n    toString() {\n        const ss = this.entries().map(e => '{' + e.key + ':' + e.value + '}');\n        return '[' + ss.join(\", \") + ']';\n    }\n\n    get length() {\n        return Object.keys(this.data).filter(key => key.startsWith(HASH_KEY_PREFIX)).map(key => this.data[key].length, this).reduce((accum, item) => accum + item, 0);\n    }\n}\n","/* Copyright (c) 2012-2022 The ANTLR Project Contributors. All rights reserved.\n * Use is of this file is governed by the BSD 3-clause license that\n * can be found in the LICENSE.txt file in the project root.\n */\nimport RuleContext from \"./RuleContext.js\";\nimport PredictionContext from \"./PredictionContext.js\";\nimport ArrayPredictionContext from \"./ArrayPredictionContext.js\";\nimport SingletonPredictionContext from \"./SingletonPredictionContext.js\";\nimport EmptyPredictionContext from \"./EmptyPredictionContext.js\";\nimport HashMap from \"../misc/HashMap.js\";\n\n/**\n * Convert a {@link RuleContext} tree to a {@link PredictionContext} graph.\n * Return {@link //EMPTY} if {@code outerContext} is empty or null.\n */\nexport function predictionContextFromRuleContext(atn, outerContext) {\n    if (outerContext === undefined || outerContext === null) {\n        outerContext = RuleContext.EMPTY;\n    }\n    // if we are in RuleContext of start rule, s, then PredictionContext\n    // is EMPTY. Nobody called us. (if we are empty, return empty)\n    if (outerContext.parentCtx === null || outerContext === RuleContext.EMPTY) {\n        return PredictionContext.EMPTY;\n    }\n    // If we have a parent, convert it to a PredictionContext graph\n    const parent = predictionContextFromRuleContext(atn, outerContext.parentCtx);\n    const state = atn.states[outerContext.invokingState];\n    const transition = state.transitions[0];\n    return SingletonPredictionContext.create(parent, transition.followState.stateNumber);\n}\n\n\nexport function getCachedPredictionContext(context, contextCache, visited) {\n    if (context.isEmpty()) {\n        return context;\n    }\n    let existing = visited.get(context) || null;\n    if (existing !== null) {\n        return existing;\n    }\n    existing = contextCache.get(context);\n    if (existing !== null) {\n        visited.set(context, existing);\n        return existing;\n    }\n    let changed = false;\n    let parents = [];\n    for (let i = 0; i < parents.length; i++) {\n        const parent = getCachedPredictionContext(context.getParent(i), contextCache, visited);\n        if (changed || parent !== context.getParent(i)) {\n            if (!changed) {\n                parents = [];\n                for (let j = 0; j < context.length; j++) {\n                    parents[j] = context.getParent(j);\n                }\n                changed = true;\n            }\n            parents[i] = parent;\n        }\n    }\n    if (!changed) {\n        contextCache.add(context);\n        visited.set(context, context);\n        return context;\n    }\n    let updated = null;\n    if (parents.length === 0) {\n        updated = PredictionContext.EMPTY;\n    } else if (parents.length === 1) {\n        updated = SingletonPredictionContext.create(parents[0], context\n            .getReturnState(0));\n    } else {\n        updated = new ArrayPredictionContext(parents, context.returnStates);\n    }\n    contextCache.add(updated);\n    visited.set(updated, updated);\n    visited.set(context, updated);\n\n    return updated;\n}\n\nexport function merge(a, b, rootIsWildcard, mergeCache) {\n    // share same graph if both same\n    if (a === b) {\n        return a;\n    }\n    if (a instanceof SingletonPredictionContext && b instanceof SingletonPredictionContext) {\n        return mergeSingletons(a, b, rootIsWildcard, mergeCache);\n    }\n    // At least one of a or b is array\n    // If one is $ and rootIsWildcard, return $ as * wildcard\n    if (rootIsWildcard) {\n        if (a instanceof EmptyPredictionContext) {\n            return a;\n        }\n        if (b instanceof EmptyPredictionContext) {\n            return b;\n        }\n    }\n    // convert singleton so both are arrays to normalize\n    if (a instanceof SingletonPredictionContext) {\n        a = new ArrayPredictionContext([a.getParent()], [a.returnState]);\n    }\n    if (b instanceof SingletonPredictionContext) {\n        b = new ArrayPredictionContext([b.getParent()], [b.returnState]);\n    }\n    return mergeArrays(a, b, rootIsWildcard, mergeCache);\n}\n\n\n/**\n * Merge two {@link ArrayPredictionContext} instances.\n *\n * <p>Different tops, different parents.<br>\n * <embed src=\"images/ArrayMerge_DiffTopDiffPar.svg\" type=\"image/svg+xml\"/></p>\n *\n * <p>Shared top, same parents.<br>\n * <embed src=\"images/ArrayMerge_ShareTopSamePar.svg\" type=\"image/svg+xml\"/></p>\n *\n * <p>Shared top, different parents.<br>\n * <embed src=\"images/ArrayMerge_ShareTopDiffPar.svg\" type=\"image/svg+xml\"/></p>\n *\n * <p>Shared top, all shared parents.<br>\n * <embed src=\"images/ArrayMerge_ShareTopSharePar.svg\"\n * type=\"image/svg+xml\"/></p>\n *\n * <p>Equal tops, merge parents and reduce top to\n * {@link SingletonPredictionContext}.<br>\n * <embed src=\"images/ArrayMerge_EqualTop.svg\" type=\"image/svg+xml\"/></p>\n */\nfunction mergeArrays(a, b, rootIsWildcard, mergeCache) {\n    if (mergeCache !== null) {\n        let previous = mergeCache.get(a, b);\n        if (previous !== null) {\n            if ( PredictionContext.trace_atn_sim ) console.log(\"mergeArrays a=\"+a+\",b=\"+b+\" -> previous\");\n            return previous;\n        }\n        previous = mergeCache.get(b, a);\n        if (previous !== null) {\n            if ( PredictionContext.trace_atn_sim ) console.log(\"mergeArrays a=\"+a+\",b=\"+b+\" -> previous\");\n            return previous;\n        }\n    }\n    // merge sorted payloads a + b => M\n    let i = 0; // walks a\n    let j = 0; // walks b\n    let k = 0; // walks target M array\n\n    let mergedReturnStates = new Array(a.returnStates.length + b.returnStates.length).fill(0);\n    let mergedParents = new Array(a.returnStates.length + b.returnStates.length).fill(null);\n    // walk and merge to yield mergedParents, mergedReturnStates\n    while (i < a.returnStates.length && j < b.returnStates.length) {\n        const a_parent = a.parents[i];\n        const b_parent = b.parents[j];\n        if (a.returnStates[i] === b.returnStates[j]) {\n            // same payload (stack tops are equal), must yield merged singleton\n            const payload = a.returnStates[i];\n            // $+$ = $\n            const bothDollars = payload === PredictionContext.EMPTY_RETURN_STATE &&\n                a_parent === null && b_parent === null;\n            const ax_ax = (a_parent !== null && b_parent !== null && a_parent === b_parent); // ax+ax\n            // ->\n            // ax\n            if (bothDollars || ax_ax) {\n                mergedParents[k] = a_parent; // choose left\n                mergedReturnStates[k] = payload;\n            } else { // ax+ay -> a'[x,y]\n                mergedParents[k] = merge(a_parent, b_parent, rootIsWildcard, mergeCache);\n                mergedReturnStates[k] = payload;\n            }\n            i += 1; // hop over left one as usual\n            j += 1; // but also skip one in right side since we merge\n        } else if (a.returnStates[i] < b.returnStates[j]) { // copy a[i] to M\n            mergedParents[k] = a_parent;\n            mergedReturnStates[k] = a.returnStates[i];\n            i += 1;\n        } else { // b > a, copy b[j] to M\n            mergedParents[k] = b_parent;\n            mergedReturnStates[k] = b.returnStates[j];\n            j += 1;\n        }\n        k += 1;\n    }\n    // copy over any payloads remaining in either array\n    if (i < a.returnStates.length) {\n        for (let p = i; p < a.returnStates.length; p++) {\n            mergedParents[k] = a.parents[p];\n            mergedReturnStates[k] = a.returnStates[p];\n            k += 1;\n        }\n    } else {\n        for (let p = j; p < b.returnStates.length; p++) {\n            mergedParents[k] = b.parents[p];\n            mergedReturnStates[k] = b.returnStates[p];\n            k += 1;\n        }\n    }\n    // trim merged if we combined a few that had same stack tops\n    if (k < mergedParents.length) { // write index < last position; trim\n        if (k === 1) { // for just one merged element, return singleton top\n            const a_ = SingletonPredictionContext.create(mergedParents[0],\n                mergedReturnStates[0]);\n            if (mergeCache !== null) {\n                mergeCache.set(a, b, a_);\n            }\n            return a_;\n        }\n        mergedParents = mergedParents.slice(0, k);\n        mergedReturnStates = mergedReturnStates.slice(0, k);\n    }\n\n    const M = new ArrayPredictionContext(mergedParents, mergedReturnStates);\n\n    // if we created same array as a or b, return that instead\n    // TODO: track whether this is possible above during merge sort for speed\n    if (M.equals(a)) {\n        if (mergeCache !== null) {\n            mergeCache.set(a, b, a);\n        }\n        if ( PredictionContext.trace_atn_sim ) console.log(\"mergeArrays a=\"+a+\",b=\"+b+\" -> a\");\n        return a;\n    }\n    if (M.equals(b)) {\n        if (mergeCache !== null) {\n            mergeCache.set(a, b, b);\n        }\n        if ( PredictionContext.trace_atn_sim ) console.log(\"mergeArrays a=\"+a+\",b=\"+b+\" -> b\");\n        return b;\n    }\n    combineCommonParents(mergedParents);\n\n    if (mergeCache !== null) {\n        mergeCache.set(a, b, M);\n    }\n\n    if ( PredictionContext.trace_atn_sim ) console.log(\"mergeArrays a=\"+a+\",b=\"+b+\" -> \"+M);\n\n    return M;\n}\n\n\n/**\n * Make pass over all <em>M</em> {@code parents}; merge any {@code equals()}\n * ones.\n */\nfunction combineCommonParents(parents) {\n    const uniqueParents = new HashMap();\n\n    for (let p = 0; p < parents.length; p++) {\n        const parent = parents[p];\n        if (!(uniqueParents.containsKey(parent))) {\n            uniqueParents.set(parent, parent);\n        }\n    }\n    for (let q = 0; q < parents.length; q++) {\n        parents[q] = uniqueParents.get(parents[q]);\n    }\n}\n\n\n/**\n * Merge two {@link SingletonPredictionContext} instances.\n *\n * <p>Stack tops equal, parents merge is same; return left graph.<br>\n * <embed src=\"images/SingletonMerge_SameRootSamePar.svg\"\n * type=\"image/svg+xml\"/></p>\n *\n * <p>Same stack top, parents differ; merge parents giving array node, then\n * remainders of those graphs. A new root node is created to point to the\n * merged parents.<br>\n * <embed src=\"images/SingletonMerge_SameRootDiffPar.svg\"\n * type=\"image/svg+xml\"/></p>\n *\n * <p>Different stack tops pointing to same parent. Make array node for the\n * root where both element in the root point to the same (original)\n * parent.<br>\n * <embed src=\"images/SingletonMerge_DiffRootSamePar.svg\"\n * type=\"image/svg+xml\"/></p>\n *\n * <p>Different stack tops pointing to different parents. Make array node for\n * the root where each element points to the corresponding original\n * parent.<br>\n * <embed src=\"images/SingletonMerge_DiffRootDiffPar.svg\"\n * type=\"image/svg+xml\"/></p>\n *\n * @param a the first {@link SingletonPredictionContext}\n * @param b the second {@link SingletonPredictionContext}\n * @param rootIsWildcard {@code true} if this is a local-context merge,\n * otherwise false to indicate a full-context merge\n * @param mergeCache\n */\nfunction mergeSingletons(a, b, rootIsWildcard, mergeCache) {\n    if (mergeCache !== null) {\n        let previous = mergeCache.get(a, b);\n        if (previous !== null) {\n            return previous;\n        }\n        previous = mergeCache.get(b, a);\n        if (previous !== null) {\n            return previous;\n        }\n    }\n\n    const rootMerge = mergeRoot(a, b, rootIsWildcard);\n    if (rootMerge !== null) {\n        if (mergeCache !== null) {\n            mergeCache.set(a, b, rootMerge);\n        }\n        return rootMerge;\n    }\n    if (a.returnState === b.returnState) {\n        const parent = merge(a.parentCtx, b.parentCtx, rootIsWildcard, mergeCache);\n        // if parent is same as existing a or b parent or reduced to a parent,\n        // return it\n        if (parent === a.parentCtx) {\n            return a; // ax + bx = ax, if a=b\n        }\n        if (parent === b.parentCtx) {\n            return b; // ax + bx = bx, if a=b\n        }\n        // else: ax + ay = a'[x,y]\n        // merge parents x and y, giving array node with x,y then remainders\n        // of those graphs. dup a, a' points at merged array\n        // new joined parent so create new singleton pointing to it, a'\n        const spc = SingletonPredictionContext.create(parent, a.returnState);\n        if (mergeCache !== null) {\n            mergeCache.set(a, b, spc);\n        }\n        return spc;\n    } else { // a != b payloads differ\n        // see if we can collapse parents due to $+x parents if local ctx\n        let singleParent = null;\n        if (a === b || (a.parentCtx !== null && a.parentCtx === b.parentCtx)) { // ax +\n            // bx =\n            // [a,b]x\n            singleParent = a.parentCtx;\n        }\n        if (singleParent !== null) { // parents are same\n            // sort payloads and use same parent\n            const payloads = [ a.returnState, b.returnState ];\n            if (a.returnState > b.returnState) {\n                payloads[0] = b.returnState;\n                payloads[1] = a.returnState;\n            }\n            const parents = [ singleParent, singleParent ];\n            const apc = new ArrayPredictionContext(parents, payloads);\n            if (mergeCache !== null) {\n                mergeCache.set(a, b, apc);\n            }\n            return apc;\n        }\n        // parents differ and can't merge them. Just pack together\n        // into array; can't merge.\n        // ax + by = [ax,by]\n        const payloads = [ a.returnState, b.returnState ];\n        let parents = [ a.parentCtx, b.parentCtx ];\n        if (a.returnState > b.returnState) { // sort by payload\n            payloads[0] = b.returnState;\n            payloads[1] = a.returnState;\n            parents = [ b.parentCtx, a.parentCtx ];\n        }\n        const a_ = new ArrayPredictionContext(parents, payloads);\n        if (mergeCache !== null) {\n            mergeCache.set(a, b, a_);\n        }\n        return a_;\n    }\n}\n\n\n/**\n * Handle case where at least one of {@code a} or {@code b} is\n * {@link //EMPTY}. In the following diagrams, the symbol {@code $} is used\n * to represent {@link //EMPTY}.\n *\n * <h2>Local-Context Merges</h2>\n *\n * <p>These local-context merge operations are used when {@code rootIsWildcard}\n * is true.</p>\n *\n * <p>{@link //EMPTY} is superset of any graph; return {@link //EMPTY}.<br>\n * <embed src=\"images/LocalMerge_EmptyRoot.svg\" type=\"image/svg+xml\"/></p>\n *\n * <p>{@link //EMPTY} and anything is {@code //EMPTY}, so merged parent is\n * {@code //EMPTY}; return left graph.<br>\n * <embed src=\"images/LocalMerge_EmptyParent.svg\" type=\"image/svg+xml\"/></p>\n *\n * <p>Special case of last merge if local context.<br>\n * <embed src=\"images/LocalMerge_DiffRoots.svg\" type=\"image/svg+xml\"/></p>\n *\n * <h2>Full-Context Merges</h2>\n *\n * <p>These full-context merge operations are used when {@code rootIsWildcard}\n * is false.</p>\n *\n * <p><embed src=\"images/FullMerge_EmptyRoots.svg\" type=\"image/svg+xml\"/></p>\n *\n * <p>Must keep all contexts; {@link //EMPTY} in array is a special value (and\n * null parent).<br>\n * <embed src=\"images/FullMerge_EmptyRoot.svg\" type=\"image/svg+xml\"/></p>\n *\n * <p><embed src=\"images/FullMerge_SameRoot.svg\" type=\"image/svg+xml\"/></p>\n *\n * @param a the first {@link SingletonPredictionContext}\n * @param b the second {@link SingletonPredictionContext}\n * @param rootIsWildcard {@code true} if this is a local-context merge,\n * otherwise false to indicate a full-context merge\n */\nfunction mergeRoot(a, b, rootIsWildcard) {\n    if (rootIsWildcard) {\n        if (a === PredictionContext.EMPTY) {\n            return PredictionContext.EMPTY; // // + b =//\n        }\n        if (b === PredictionContext.EMPTY) {\n            return PredictionContext.EMPTY; // a +// =//\n        }\n    } else {\n        if (a === PredictionContext.EMPTY && b === PredictionContext.EMPTY) {\n            return PredictionContext.EMPTY; // $ + $ = $\n        } else if (a === PredictionContext.EMPTY) { // $ + x = [$,x]\n            const payloads = [ b.returnState,\n                PredictionContext.EMPTY_RETURN_STATE ];\n            const parents = [ b.parentCtx, null ];\n            return new ArrayPredictionContext(parents, payloads);\n        } else if (b === PredictionContext.EMPTY) { // x + $ = [$,x] ($ is always first if present)\n            const payloads = [ a.returnState, PredictionContext.EMPTY_RETURN_STATE ];\n            const parents = [ a.parentCtx, null ];\n            return new ArrayPredictionContext(parents, payloads);\n        }\n    }\n    return null;\n}\n\n\n// ter's recursive version of Sam's getAllNodes()\nexport function getAllContextNodes(context, nodes, visited) {\n    if (nodes === null) {\n        nodes = [];\n        return getAllContextNodes(context, nodes, visited);\n    } else if (visited === null) {\n        visited = new HashMap();\n        return getAllContextNodes(context, nodes, visited);\n    } else {\n        if (context === null || visited.containsKey(context)) {\n            return nodes;\n        }\n        visited.set(context, context);\n        nodes.push(context);\n        for (let i = 0; i < context.length; i++) {\n            getAllContextNodes(context.getParent(i), nodes, visited);\n        }\n        return nodes;\n    }\n}\n\n","/* Copyright (c) 2012-2022 The ANTLR Project Contributors. All rights reserved.\n * Use is of this file is governed by the BSD 3-clause license that\n * can be found in the LICENSE.txt file in the project root.\n */\nimport HashCode from \"./HashCode.js\";\nimport equalArrays from \"../utils/equalArrays.js\";\n\nexport default class BitSet {\n\n    constructor() {\n        this.data = [];\n    }\n\n    add(value) {\n        this.data[value] = true;\n    }\n\n    or(set) {\n        Object.keys(set.data).map(alt => this.add(alt), this);\n    }\n\n    remove(value) {\n        delete this.data[value];\n    }\n\n    has(value) {\n        return this.data[value] === true;\n    }\n\n    values() {\n        return Object.keys(this.data);\n    }\n\n    minValue() {\n        return Math.min.apply(null, this.values());\n    }\n\n    hashCode() {\n        return HashCode.hashStuff(this.values());\n    }\n\n    equals(other) {\n        return other instanceof BitSet && equalArrays(this.data, other.data);\n    }\n\n    toString() {\n        return \"{\" + this.values().join(\", \") + \"}\";\n    }\n\n    get length(){\n        return this.values().length;\n    }\n}\n","/* Copyright (c) 2012-2022 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause license that\n * can be found in the LICENSE.txt file in the project root.\n */\n\nimport Token from '../Token.js';\nimport ATNConfig from './ATNConfig.js';\nimport IntervalSet from '../misc/IntervalSet.js';\nimport RuleStopState from '../state/RuleStopState.js';\nimport RuleTransition from '../transition/RuleTransition.js';\nimport NotSetTransition from '../transition/NotSetTransition.js';\nimport WildcardTransition from '../transition/WildcardTransition.js';\nimport AbstractPredicateTransition from './AbstractPredicateTransition.js';\nimport { predictionContextFromRuleContext } from '../context/PredictionContextUtils.js';\nimport PredictionContext from '../context/PredictionContext.js';\nimport SingletonPredictionContext from '../context/SingletonPredictionContext.js';\nimport BitSet from \"../misc/BitSet.js\";\nimport HashSet from \"../misc/HashSet.js\";\n\nexport default class LL1Analyzer {\n    constructor(atn) {\n        this.atn = atn;\n    }\n\n    /**\n     * Calculates the SLL(1) expected lookahead set for each outgoing transition\n     * of an {@link ATNState}. The returned array has one element for each\n     * outgoing transition in {@code s}. If the closure from transition\n     * <em>i</em> leads to a semantic predicate before matching a symbol, the\n     * element at index <em>i</em> of the result will be {@code null}.\n     *\n     * @param s the ATN state\n     * @return the expected symbols for each outgoing transition of {@code s}.\n     */\n    getDecisionLookahead(s) {\n        if (s === null) {\n            return null;\n        }\n        const count = s.transitions.length;\n        const look = [];\n        for(let alt=0; alt< count; alt++) {\n            look[alt] = new IntervalSet();\n            const lookBusy = new HashSet();\n            const seeThruPreds = false; // fail to get lookahead upon pred\n            this._LOOK(s.transition(alt).target, null, PredictionContext.EMPTY,\n                  look[alt], lookBusy, new BitSet(), seeThruPreds, false);\n            // Wipe out lookahead for this alternative if we found nothing\n            // or we had a predicate when we !seeThruPreds\n            if (look[alt].length===0 || look[alt].contains(LL1Analyzer.HIT_PRED)) {\n                look[alt] = null;\n            }\n        }\n        return look;\n    }\n\n    /**\n     * Compute set of tokens that can follow {@code s} in the ATN in the\n     * specified {@code ctx}.\n     *\n     * <p>If {@code ctx} is {@code null} and the end of the rule containing\n     * {@code s} is reached, {@link Token//EPSILON} is added to the result set.\n     * If {@code ctx} is not {@code null} and the end of the outermost rule is\n     * reached, {@link Token//EOF} is added to the result set.</p>\n     *\n     * @param s the ATN state\n     * @param stopState the ATN state to stop at. This can be a\n     * {@link BlockEndState} to detect epsilon paths through a closure.\n     * @param ctx the complete parser context, or {@code null} if the context\n     * should be ignored\n     *\n     * @return The set of tokens that can follow {@code s} in the ATN in the\n     * specified {@code ctx}.\n     */\n    LOOK(s, stopState, ctx) {\n        const r = new IntervalSet();\n        const seeThruPreds = true; // ignore preds; get all lookahead\n        ctx = ctx || null;\n        const lookContext = ctx!==null ? predictionContextFromRuleContext(s.atn, ctx) : null;\n        this._LOOK(s, stopState, lookContext, r, new HashSet(), new BitSet(), seeThruPreds, true);\n        return r;\n    }\n\n    /**\n     * Compute set of tokens that can follow {@code s} in the ATN in the\n     * specified {@code ctx}.\n     *\n     * <p>If {@code ctx} is {@code null} and {@code stopState} or the end of the\n     * rule containing {@code s} is reached, {@link Token//EPSILON} is added to\n     * the result set. If {@code ctx} is not {@code null} and {@code addEOF} is\n     * {@code true} and {@code stopState} or the end of the outermost rule is\n     * reached, {@link Token//EOF} is added to the result set.</p>\n     *\n     * @param s the ATN state.\n     * @param stopState the ATN state to stop at. This can be a\n     * {@link BlockEndState} to detect epsilon paths through a closure.\n     * @param ctx The outer context, or {@code null} if the outer context should\n     * not be used.\n     * @param look The result lookahead set.\n     * @param lookBusy A set used for preventing epsilon closures in the ATN\n     * from causing a stack overflow. Outside code should pass\n     * {@code new CustomizedSet<ATNConfig>} for this argument.\n     * @param calledRuleStack A set used for preventing left recursion in the\n     * ATN from causing a stack overflow. Outside code should pass\n     * {@code new BitSet()} for this argument.\n     * @param seeThruPreds {@code true} to true semantic predicates as\n     * implicitly {@code true} and \"see through them\", otherwise {@code false}\n     * to treat semantic predicates as opaque and add {@link //HIT_PRED} to the\n     * result if one is encountered.\n     * @param addEOF Add {@link Token//EOF} to the result if the end of the\n     * outermost context is reached. This parameter has no effect if {@code ctx}\n     * is {@code null}.\n     */\n    _LOOK(s, stopState , ctx, look, lookBusy, calledRuleStack, seeThruPreds, addEOF) {\n        const c = new ATNConfig({state:s, alt:0, context: ctx}, null);\n        if (lookBusy.has(c)) {\n            return;\n        }\n        lookBusy.add(c);\n        if (s === stopState) {\n            if (ctx ===null) {\n                look.addOne(Token.EPSILON);\n                return;\n            } else if (ctx.isEmpty() && addEOF) {\n                look.addOne(Token.EOF);\n                return;\n            }\n        }\n        if (s instanceof RuleStopState ) {\n            if (ctx ===null) {\n                look.addOne(Token.EPSILON);\n                return;\n            } else if (ctx.isEmpty() && addEOF) {\n                look.addOne(Token.EOF);\n                return;\n            }\n            if (ctx !== PredictionContext.EMPTY) {\n                const removed = calledRuleStack.has(s.ruleIndex);\n                try {\n                    calledRuleStack.remove(s.ruleIndex);\n                    // run thru all possible stack tops in ctx\n                    for (let i = 0; i < ctx.length; i++) {\n                        const returnState = this.atn.states[ctx.getReturnState(i)];\n                        this._LOOK(returnState, stopState, ctx.getParent(i), look, lookBusy, calledRuleStack, seeThruPreds, addEOF);\n                    }\n                }finally {\n                    if (removed) {\n                        calledRuleStack.add(s.ruleIndex);\n                    }\n                }\n                return;\n            }\n        }\n        for(let j=0; j<s.transitions.length; j++) {\n            const t = s.transitions[j];\n            if (t.constructor === RuleTransition) {\n                if (calledRuleStack.has(t.target.ruleIndex)) {\n                    continue;\n                }\n                const newContext = SingletonPredictionContext.create(ctx, t.followState.stateNumber);\n                try {\n                    calledRuleStack.add(t.target.ruleIndex);\n                    this._LOOK(t.target, stopState, newContext, look, lookBusy, calledRuleStack, seeThruPreds, addEOF);\n                } finally {\n                    calledRuleStack.remove(t.target.ruleIndex);\n                }\n            } else if (t instanceof AbstractPredicateTransition ) {\n                if (seeThruPreds) {\n                    this._LOOK(t.target, stopState, ctx, look, lookBusy, calledRuleStack, seeThruPreds, addEOF);\n                } else {\n                    look.addOne(LL1Analyzer.HIT_PRED);\n                }\n            } else if( t.isEpsilon) {\n                this._LOOK(t.target, stopState, ctx, look, lookBusy, calledRuleStack, seeThruPreds, addEOF);\n            } else if (t.constructor === WildcardTransition) {\n                look.addRange( Token.MIN_USER_TOKEN_TYPE, this.atn.maxTokenType );\n            } else {\n                let set = t.label;\n                if (set !== null) {\n                    if (t instanceof NotSetTransition) {\n                        set = set.complement(Token.MIN_USER_TOKEN_TYPE, this.atn.maxTokenType);\n                    }\n                    look.addSet(set);\n                }\n            }\n        }\n    }\n}\n\n/**\n * Special value added to the lookahead sets to indicate that we hit\n * a predicate during analysis if {@code seeThruPreds==false}.\n */\nLL1Analyzer.HIT_PRED = Token.INVALID_TYPE;\n","/* Copyright (c) 2012-2022 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause license that\n * can be found in the LICENSE.txt file in the project root.\n */\n\nimport LL1Analyzer from './LL1Analyzer.js';\nimport IntervalSet from '../misc/IntervalSet.js';\nimport Token from '../Token.js';\n\nexport default class ATN {\n\n    constructor(grammarType , maxTokenType) {\n        /**\n         * Used for runtime deserialization of ATNs from strings\n         * The type of the ATN.\n        */\n        this.grammarType = grammarType;\n        // The maximum value for any symbol recognized by a transition in the ATN.\n        this.maxTokenType = maxTokenType;\n        this.states = [];\n        /**\n         * Each subrule/rule is a decision point and we must track them so we\n         * can go back later and build DFA predictors for them.  This includes\n         * all the rules, subrules, optional blocks, ()+, ()* etc...\n         */\n        this.decisionToState = [];\n        // Maps from rule index to starting state number.\n        this.ruleToStartState = [];\n        // Maps from rule index to stop state number.\n        this.ruleToStopState = null;\n        this.modeNameToStartState = {};\n        /**\n         * For lexer ATNs, this maps the rule index to the resulting token type.\n         * For parser ATNs, this maps the rule index to the generated bypass token\n         * type if the {@link ATNDeserializationOptions//isGenerateRuleBypassTransitions}\n         * deserialization option was specified; otherwise, this is {@code null}\n         */\n        this.ruleToTokenType = null;\n        /**\n         * For lexer ATNs, this is an array of {@link LexerAction} objects which may\n         * be referenced by action transitions in the ATN\n         */\n        this.lexerActions = null;\n        this.modeToStartState = [];\n    }\n\n    /**\n     * Compute the set of valid tokens that can occur starting in state {@code s}.\n     * If {@code ctx} is null, the set of tokens will not include what can follow\n     * the rule surrounding {@code s}. In other words, the set will be\n     * restricted to tokens reachable staying within {@code s}'s rule\n     */\n    nextTokensInContext(s, ctx) {\n        const anal = new LL1Analyzer(this);\n        return anal.LOOK(s, null, ctx);\n    }\n\n    /**\n     * Compute the set of valid tokens that can occur starting in {@code s} and\n     * staying in same rule. {@link Token//EPSILON} is in set if we reach end of\n     * rule\n     */\n    nextTokensNoContext(s) {\n        if (s.nextTokenWithinRule !== null ) {\n            return s.nextTokenWithinRule;\n        }\n        s.nextTokenWithinRule = this.nextTokensInContext(s, null);\n        s.nextTokenWithinRule.readOnly = true;\n        return s.nextTokenWithinRule;\n    }\n\n    nextTokens(s, ctx) {\n        if ( ctx===undefined ) {\n            return this.nextTokensNoContext(s);\n        } else {\n            return this.nextTokensInContext(s, ctx);\n        }\n    }\n\n    addState(state) {\n        if ( state !== null ) {\n            state.atn = this;\n            state.stateNumber = this.states.length;\n        }\n        this.states.push(state);\n    }\n\n    removeState(state) {\n        this.states[state.stateNumber] = null; // just free mem, don't shift states in list\n    }\n\n    defineDecisionState(s) {\n        this.decisionToState.push(s);\n        s.decision = this.decisionToState.length-1;\n        return s.decision;\n    }\n\n    getDecisionState(decision) {\n        if (this.decisionToState.length===0) {\n            return null;\n        } else {\n            return this.decisionToState[decision];\n        }\n    }\n\n    /**\n     * Computes the set of input symbols which could follow ATN state number\n     * {@code stateNumber} in the specified full {@code context}. This method\n     * considers the complete parser context, but does not evaluate semantic\n     * predicates (i.e. all predicates encountered during the calculation are\n     * assumed true). If a path in the ATN exists from the starting state to the\n     * {@link RuleStopState} of the outermost context without matching any\n     * symbols, {@link Token//EOF} is added to the returned set.\n     *\n     * <p>If {@code context} is {@code null}, it is treated as\n     * {@link ParserRuleContext//EMPTY}.</p>\n     *\n     * @param stateNumber the ATN state number\n     * @param ctx the full parse context\n     *\n     * @return {IntervalSet} The set of potentially valid input symbols which could follow the\n     * specified state in the specified context.\n     *\n     * @throws IllegalArgumentException if the ATN does not contain a state with\n     * number {@code stateNumber}\n     */\n    getExpectedTokens(stateNumber, ctx ) {\n        if ( stateNumber < 0 || stateNumber >= this.states.length ) {\n            throw(\"Invalid state number.\");\n        }\n        const s = this.states[stateNumber];\n        let following = this.nextTokens(s);\n        if (!following.contains(Token.EPSILON)) {\n            return following;\n        }\n        const expected = new IntervalSet();\n        expected.addSet(following);\n        expected.removeOne(Token.EPSILON);\n        while (ctx !== null && ctx.invokingState >= 0 && following.contains(Token.EPSILON)) {\n            const invokingState = this.states[ctx.invokingState];\n            const rt = invokingState.transitions[0];\n            following = this.nextTokens(rt.followState);\n            expected.addSet(following);\n            expected.removeOne(Token.EPSILON);\n            ctx = ctx.parentCtx;\n        }\n        if (following.contains(Token.EPSILON)) {\n            expected.addOne(Token.EOF);\n        }\n        return expected;\n    }\n}\n\nATN.INVALID_ALT_NUMBER = 0;\n\n","/* Copyright (c) 2012-2022 The ANTLR Project Contributors. All rights reserved.\n * Use is of this file is governed by the BSD 3-clause license that\n * can be found in the LICENSE.txt file in the project root.\n */\nimport ATNState from \"./ATNState.js\";\n\nexport default class BasicState extends ATNState {\n    constructor() {\n        super();\n        this.stateType = ATNState.BASIC;\n    }\n}\n","/* Copyright (c) 2012-2022 The ANTLR Project Contributors. All rights reserved.\n * Use is of this file is governed by the BSD 3-clause license that\n * can be found in the LICENSE.txt file in the project root.\n */\nimport ATNState from \"./ATNState.js\";\n\nexport default class DecisionState extends ATNState {\n    constructor() {\n        super();\n        this.decision = -1;\n        this.nonGreedy = false;\n        return this;\n    }\n}\n","/* Copyright (c) 2012-2022 The ANTLR Project Contributors. All rights reserved.\n * Use is of this file is governed by the BSD 3-clause license that\n * can be found in the LICENSE.txt file in the project root.\n */\nimport DecisionState from \"./DecisionState.js\";\n\n/**\n *  The start of a regular {@code (...)} block\n */\nexport default class BlockStartState extends DecisionState {\n    constructor() {\n        super();\n        this.endState = null;\n        return this;\n    }\n}\n","/* Copyright (c) 2012-2022 The ANTLR Project Contributors. All rights reserved.\n * Use is of this file is governed by the BSD 3-clause license that\n * can be found in the LICENSE.txt file in the project root.\n */\nimport ATNState from \"./ATNState.js\";\n\n/**\n * Terminal node of a simple {@code (a|b|c)} block\n */\nexport default class BlockEndState extends ATNState {\n    constructor() {\n        super();\n        this.stateType = ATNState.BLOCK_END;\n        this.startState = null;\n        return this;\n    }\n}\n","/* Copyright (c) 2012-2022 The ANTLR Project Contributors. All rights reserved.\n * Use is of this file is governed by the BSD 3-clause license that\n * can be found in the LICENSE.txt file in the project root.\n */\nimport ATNState from \"./ATNState.js\";\n\n/**\n * Mark the end of a * or + loop\n */\nexport default class LoopEndState extends ATNState {\n    constructor() {\n        super();\n        this.stateType = ATNState.LOOP_END;\n        this.loopBackState = null;\n        return this;\n    }\n}\n","/* Copyright (c) 2012-2022 The ANTLR Project Contributors. All rights reserved.\n * Use is of this file is governed by the BSD 3-clause license that\n * can be found in the LICENSE.txt file in the project root.\n */\nimport ATNState from \"./ATNState.js\";\n\nexport default class RuleStartState extends ATNState {\n    constructor() {\n        super();\n        this.stateType = ATNState.RULE_START;\n        this.stopState = null;\n        this.isPrecedenceRule = false;\n        return this;\n    }\n}\n","/* Copyright (c) 2012-2022 The ANTLR Project Contributors. All rights reserved.\n * Use is of this file is governed by the BSD 3-clause license that\n * can be found in the LICENSE.txt file in the project root.\n */\nimport DecisionState from \"./DecisionState.js\";\nimport ATNState from \"./ATNState.js\";\n\n/**\n * The Tokens rule start state linking to each lexer rule start state\n */\nexport default class TokensStartState extends DecisionState {\n    constructor() {\n        super();\n        this.stateType = ATNState.TOKEN_START;\n        return this;\n    }\n}\n","/* Copyright (c) 2012-2022 The ANTLR Project Contributors. All rights reserved.\n * Use is of this file is governed by the BSD 3-clause license that\n * can be found in the LICENSE.txt file in the project root.\n */\nimport DecisionState from \"./DecisionState.js\";\nimport ATNState from \"./ATNState.js\";\n\n/**\n * Decision state for {@code A+} and {@code (A|B)+}.  It has two transitions:\n * one to the loop back to start of the block and one to exit.\n */\nexport default class PlusLoopbackState extends DecisionState {\n    constructor() {\n        super();\n        this.stateType = ATNState.PLUS_LOOP_BACK;\n        return this;\n    }\n}\n","/* Copyright (c) 2012-2022 The ANTLR Project Contributors. All rights reserved.\n * Use is of this file is governed by the BSD 3-clause license that\n * can be found in the LICENSE.txt file in the project root.\n */\nimport ATNState from \"./ATNState.js\";\n\nexport default class StarLoopbackState extends ATNState {\n    constructor() {\n        super();\n        this.stateType = ATNState.STAR_LOOP_BACK;\n        return this;\n    }\n}\n","/* Copyright (c) 2012-2022 The ANTLR Project Contributors. All rights reserved.\n * Use is of this file is governed by the BSD 3-clause license that\n * can be found in the LICENSE.txt file in the project root.\n */\nimport DecisionState from \"./DecisionState.js\";\nimport ATNState from \"./ATNState.js\";\n\nexport default class StarLoopEntryState extends DecisionState {\n    constructor() {\n        super();\n        this.stateType = ATNState.STAR_LOOP_ENTRY;\n        this.loopBackState = null;\n        // Indicates whether this state can benefit from a precedence DFA during SLL decision making.\n        this.isPrecedenceDecision = null;\n        return this;\n    }\n}\n","/* Copyright (c) 2012-2022 The ANTLR Project Contributors. All rights reserved.\n * Use is of this file is governed by the BSD 3-clause license that\n * can be found in the LICENSE.txt file in the project root.\n */\nimport BlockStartState from \"./BlockStartState.js\";\nimport ATNState from \"./ATNState.js\";\n\n/**\n * Start of {@code (A|B|...)+} loop. Technically a decision state, but\n * we don't use for code generation; somebody might need it, so I'm defining\n * it for completeness. In reality, the {@link PlusLoopbackState} node is the\n * real decision-making note for {@code A+}\n */\nexport default class PlusBlockStartState extends BlockStartState {\n    constructor() {\n        super();\n        this.stateType = ATNState.PLUS_BLOCK_START;\n        this.loopBackState = null;\n        return this;\n    }\n}\n","/* Copyright (c) 2012-2022 The ANTLR Project Contributors. All rights reserved.\n * Use is of this file is governed by the BSD 3-clause license that\n * can be found in the LICENSE.txt file in the project root.\n */\nimport BlockStartState from \"./BlockStartState.js\";\nimport ATNState from \"./ATNState.js\";\n\n/**\n * The block that begins a closure loop\n */\nexport default class StarBlockStartState extends BlockStartState {\n    constructor() {\n        super();\n        this.stateType = ATNState.STAR_BLOCK_START;\n        return this;\n    }\n}\n","/* Copyright (c) 2012-2022 The ANTLR Project Contributors. All rights reserved.\n * Use is of this file is governed by the BSD 3-clause license that\n * can be found in the LICENSE.txt file in the project root.\n */\nimport ATNState from \"./ATNState.js\";\nimport BlockStartState from \"./BlockStartState.js\";\n\nexport default class BasicBlockStartState extends BlockStartState {\n    constructor() {\n        super();\n        this.stateType = ATNState.BLOCK_START;\n        return this;\n    }\n}\n","/* Copyright (c) 2012-2022 The ANTLR Project Contributors. All rights reserved.\n * Use is of this file is governed by the BSD 3-clause license that\n * can be found in the LICENSE.txt file in the project root.\n */\nimport IntervalSet from \"../misc/IntervalSet.js\";\nimport Transition from \"./Transition.js\";\n\nexport default class AtomTransition extends Transition {\n    constructor(target, label) {\n        super(target);\n        // The token type or character value; or, signifies special label.\n        this.label_ = label;\n        this.label = this.makeLabel();\n        this.serializationType = Transition.ATOM;\n    }\n\n    makeLabel() {\n        const s = new IntervalSet();\n        s.addOne(this.label_);\n        return s;\n    }\n\n    matches(symbol, minVocabSymbol, maxVocabSymbol) {\n        return this.label_ === symbol;\n    }\n\n    toString() {\n        return this.label_;\n    }\n}\n","/* Copyright (c) 2012-2022 The ANTLR Project Contributors. All rights reserved.\n * Use is of this file is governed by the BSD 3-clause license that\n * can be found in the LICENSE.txt file in the project root.\n */\nimport IntervalSet from \"../misc/IntervalSet.js\";\nimport Transition from \"./Transition.js\";\n\nexport default class RangeTransition extends Transition {\n    constructor(target, start, stop) {\n        super(target);\n        this.serializationType = Transition.RANGE;\n        this.start = start;\n        this.stop = stop;\n        this.label = this.makeLabel();\n    }\n\n    makeLabel() {\n        const s = new IntervalSet();\n        s.addRange(this.start, this.stop);\n        return s;\n    }\n\n    matches(symbol, minVocabSymbol, maxVocabSymbol) {\n        return symbol >= this.start && symbol <= this.stop;\n    }\n\n    toString() {\n        return \"'\" + String.fromCharCode(this.start) + \"'..'\" + String.fromCharCode(this.stop) + \"'\";\n    }\n}\n","/* Copyright (c) 2012-2022 The ANTLR Project Contributors. All rights reserved.\n * Use is of this file is governed by the BSD 3-clause license that\n * can be found in the LICENSE.txt file in the project root.\n */\nimport Transition from \"./Transition.js\";\n\nexport default class ActionTransition extends Transition {\n    constructor(target, ruleIndex, actionIndex, isCtxDependent) {\n        super(target);\n        this.serializationType = Transition.ACTION;\n        this.ruleIndex = ruleIndex;\n        this.actionIndex = actionIndex===undefined ? -1 : actionIndex;\n        this.isCtxDependent = isCtxDependent===undefined ? false : isCtxDependent; // e.g., $i ref in pred\n        this.isEpsilon = true;\n    }\n\n    matches(symbol, minVocabSymbol, maxVocabSymbol) {\n        return false;\n    }\n\n    toString() {\n        return \"action_\" + this.ruleIndex + \":\" + this.actionIndex;\n    }\n}\n","/* Copyright (c) 2012-2022 The ANTLR Project Contributors. All rights reserved.\n * Use is of this file is governed by the BSD 3-clause license that\n * can be found in the LICENSE.txt file in the project root.\n */\nimport Transition from \"./Transition.js\";\n\nexport default class EpsilonTransition extends Transition {\n    constructor(target, outermostPrecedenceReturn) {\n        super(target);\n        this.serializationType = Transition.EPSILON;\n        this.isEpsilon = true;\n        this.outermostPrecedenceReturn = outermostPrecedenceReturn;\n    }\n\n    matches(symbol, minVocabSymbol, maxVocabSymbol) {\n        return false;\n    }\n\n    toString() {\n        return \"epsilon\";\n    }\n}\n","/* Copyright (c) 2012-2022 The ANTLR Project Contributors. All rights reserved.\n * Use is of this file is governed by the BSD 3-clause license that\n * can be found in the LICENSE.txt file in the project root.\n */\nimport SemanticContext from \"./SemanticContext.js\";\n\nexport default class Predicate extends SemanticContext {\n\n    constructor(ruleIndex, predIndex, isCtxDependent) {\n        super();\n        this.ruleIndex = ruleIndex === undefined ? -1 : ruleIndex;\n        this.predIndex = predIndex === undefined ? -1 : predIndex;\n        this.isCtxDependent = isCtxDependent === undefined ? false : isCtxDependent; // e.g., $i ref in pred\n    }\n\n    evaluate(parser, outerContext) {\n        const localctx = this.isCtxDependent ? outerContext : null;\n        return parser.sempred(localctx, this.ruleIndex, this.predIndex);\n    }\n\n    updateHashCode(hash) {\n        hash.update(this.ruleIndex, this.predIndex, this.isCtxDependent);\n    }\n\n    equals(other) {\n        if (this === other) {\n            return true;\n        } else if (!(other instanceof Predicate)) {\n            return false;\n        } else {\n            return this.ruleIndex === other.ruleIndex &&\n                this.predIndex === other.predIndex &&\n                this.isCtxDependent === other.isCtxDependent;\n        }\n    }\n\n    toString() {\n        return \"{\" + this.ruleIndex + \":\" + this.predIndex + \"}?\";\n    }\n}\n\n/**\n * The default {@link SemanticContext}, which is semantically equivalent to\n * a predicate of the form {@code {true}?}\n */\nSemanticContext.NONE = new Predicate();\n","/* Copyright (c) 2012-2022 The ANTLR Project Contributors. All rights reserved.\n * Use is of this file is governed by the BSD 3-clause license that\n * can be found in the LICENSE.txt file in the project root.\n */\nimport Predicate from \"../atn/Predicate.js\";\nimport Transition from \"./Transition.js\";\nimport AbstractPredicateTransition from \"../atn/AbstractPredicateTransition.js\";\n\nexport default class PredicateTransition extends AbstractPredicateTransition {\n    constructor(target, ruleIndex, predIndex, isCtxDependent) {\n        super(target);\n        this.serializationType = Transition.PREDICATE;\n        this.ruleIndex = ruleIndex;\n        this.predIndex = predIndex;\n        this.isCtxDependent = isCtxDependent; // e.g., $i ref in pred\n        this.isEpsilon = true;\n    }\n\n    matches(symbol, minVocabSymbol, maxVocabSymbol) {\n        return false;\n    }\n\n    getPredicate() {\n        return new Predicate(this.ruleIndex, this.predIndex, this.isCtxDependent);\n    }\n\n    toString() {\n        return \"pred_\" + this.ruleIndex + \":\" + this.predIndex;\n    }\n}\n","/* Copyright (c) 2012-2022 The ANTLR Project Contributors. All rights reserved.\n * Use is of this file is governed by the BSD 3-clause license that\n * can be found in the LICENSE.txt file in the project root.\n */\nimport SemanticContext from \"./SemanticContext.js\";\n\nexport default class PrecedencePredicate extends SemanticContext {\n\n    constructor(precedence) {\n        super();\n        this.precedence = precedence === undefined ? 0 : precedence;\n    }\n\n    evaluate(parser, outerContext) {\n        return parser.precpred(outerContext, this.precedence);\n    }\n\n    evalPrecedence(parser, outerContext) {\n        if (parser.precpred(outerContext, this.precedence)) {\n            return SemanticContext.NONE;\n        } else {\n            return null;\n        }\n    }\n\n    compareTo(other) {\n        return this.precedence - other.precedence;\n    }\n\n    updateHashCode(hash) {\n        hash.update(this.precedence);\n    }\n\n    equals(other) {\n        if (this === other) {\n            return true;\n        } else if (!(other instanceof PrecedencePredicate)) {\n            return false;\n        } else {\n            return this.precedence === other.precedence;\n        }\n    }\n\n    toString() {\n        return \"{\" + this.precedence + \">=prec}?\";\n    }\n\n}\n\n// HORRIBLE workaround circular import, avoiding dynamic import\nSemanticContext.PrecedencePredicate = PrecedencePredicate;\n","/* Copyright (c) 2012-2022 The ANTLR Project Contributors. All rights reserved.\n * Use is of this file is governed by the BSD 3-clause license that\n * can be found in the LICENSE.txt file in the project root.\n */\nimport PrecedencePredicate from \"../atn/PrecedencePredicate.js\";\nimport Transition from \"./Transition.js\";\nimport AbstractPredicateTransition from \"../atn/AbstractPredicateTransition.js\";\n\nexport default class PrecedencePredicateTransition extends AbstractPredicateTransition {\n    constructor(target, precedence) {\n        super(target);\n        this.serializationType = Transition.PRECEDENCE;\n        this.precedence = precedence;\n        this.isEpsilon = true;\n    }\n\n    matches(symbol, minVocabSymbol, maxVocabSymbol) {\n        return false;\n    }\n\n    getPredicate() {\n        return new PrecedencePredicate(this.precedence);\n    }\n\n    toString() {\n        return this.precedence + \" >= _p\";\n    }\n}\n","/* Copyright (c) 2012-2022 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause license that\n * can be found in the LICENSE.txt file in the project root.\n */\n\nexport default class ATNDeserializationOptions {\n\tconstructor(copyFrom) {\n\t\tif(copyFrom===undefined) {\n\t\t\tcopyFrom = null;\n\t\t}\n\t\tthis.readOnly = false;\n\t\tthis.verifyATN = copyFrom===null ? true : copyFrom.verifyATN;\n\t\tthis.generateRuleBypassTransitions = copyFrom===null ? false : copyFrom.generateRuleBypassTransitions;\n\t}\n}\n\nATNDeserializationOptions.defaultOptions = new ATNDeserializationOptions();\nATNDeserializationOptions.defaultOptions.readOnly = true;\n\n","/* Copyright (c) 2012-2022 The ANTLR Project Contributors. All rights reserved.\n * Use is of this file is governed by the BSD 3-clause license that\n * can be found in the LICENSE.txt file in the project root.\n */\nimport HashCode from \"../misc/HashCode.js\";\n\n/* Copyright (c) 2012-2022 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause license that\n * can be found in the LICENSE.txt file in the project root.\n */\n\n\nexport default class LexerAction {\n    constructor(action) {\n        this.actionType = action;\n        this.isPositionDependent = false;\n    }\n\n    hashCode() {\n        const hash = new HashCode();\n        this.updateHashCode(hash);\n        return hash.finish()\n    }\n\n    updateHashCode(hash) {\n        hash.update(this.actionType);\n    }\n\n    equals(other) {\n        return this === other;\n    }\n}\n\n","/* Copyright (c) 2012-2022 The ANTLR Project Contributors. All rights reserved.\n * Use is of this file is governed by the BSD 3-clause license that\n * can be found in the LICENSE.txt file in the project root.\n */\nimport {default as LexerActionType } from \"../atn/LexerActionType.js\";\nimport LexerAction from \"./LexerAction.js\";\n\n/**\n * Implements the {@code skip} lexer action by calling {@link Lexer//skip}.\n *\n * <p>The {@code skip} command does not have any parameters, so this action is\n * implemented as a singleton instance exposed by {@link //INSTANCE}.</p>\n */\nexport default class LexerSkipAction extends LexerAction {\n    constructor() {\n        super(LexerActionType.SKIP);\n    }\n\n    execute(lexer) {\n        lexer.skip();\n    }\n\n    toString() {\n        return \"skip\";\n    }\n}\n\n// Provides a singleton instance of this parameterless lexer action.\nLexerSkipAction.INSTANCE = new LexerSkipAction();\n","/* Copyright (c) 2012-2022 The ANTLR Project Contributors. All rights reserved.\n * Use is of this file is governed by the BSD 3-clause license that\n * can be found in the LICENSE.txt file in the project root.\n */\nexport default {\n    // The type of a {@link LexerChannelAction} action.\n    CHANNEL: 0,\n    // The type of a {@link LexerCustomAction} action\n    CUSTOM: 1,\n    // The type of a {@link LexerModeAction} action.\n    MODE: 2,\n    //The type of a {@link LexerMoreAction} action.\n    MORE: 3,\n    //The type of a {@link LexerPopModeAction} action.\n    POP_MODE: 4,\n    //The type of a {@link LexerPushModeAction} action.\n    PUSH_MODE: 5,\n    //The type of a {@link LexerSkipAction} action.\n    SKIP: 6,\n    //The type of a {@link LexerTypeAction} action.\n    TYPE: 7\n}\n","/* Copyright (c) 2012-2022 The ANTLR Project Contributors. All rights reserved.\n * Use is of this file is governed by the BSD 3-clause license that\n * can be found in the LICENSE.txt file in the project root.\n */\nimport {default as LexerActionType } from \"../atn/LexerActionType.js\";\nimport LexerAction from \"./LexerAction.js\";\n\n/**\n * Implements the {@code channel} lexer action by calling\n * {@link Lexer//setChannel} with the assigned channel.\n * Constructs a new {@code channel} action with the specified channel value.\n * @param channel The channel value to pass to {@link Lexer//setChannel}\n */\nexport default class LexerChannelAction extends LexerAction {\n    constructor(channel) {\n        super(LexerActionType.CHANNEL);\n        this.channel = channel;\n    }\n\n    /**\n     * <p>This action is implemented by calling {@link Lexer//setChannel} with the\n     * value provided by {@link //getChannel}.</p>\n     */\n    execute(lexer) {\n        lexer._channel = this.channel;\n    }\n\n    updateHashCode(hash) {\n        hash.update(this.actionType, this.channel);\n    }\n\n    equals(other) {\n        if (this === other) {\n            return true;\n        } else if (! (other instanceof LexerChannelAction)) {\n            return false;\n        } else {\n            return this.channel === other.channel;\n        }\n    }\n\n    toString() {\n        return \"channel(\" + this.channel + \")\";\n    }\n}\n\n","/* Copyright (c) 2012-2022 The ANTLR Project Contributors. All rights reserved.\n * Use is of this file is governed by the BSD 3-clause license that\n * can be found in the LICENSE.txt file in the project root.\n */\nimport {default as LexerActionType } from \"../atn/LexerActionType.js\";\nimport LexerAction from \"./LexerAction.js\";\n\n/**\n * Executes a custom lexer action by calling {@link Recognizer//action} with the\n * rule and action indexes assigned to the custom action. The implementation of\n * a custom action is added to the generated code for the lexer in an override\n * of {@link Recognizer//action} when the grammar is compiled.\n *\n * <p>This class may represent embedded actions created with the <code>{...}</code>\n * syntax in ANTLR 4, as well as actions created for lexer commands where the\n * command argument could not be evaluated when the grammar was compiled.</p>\n */\nexport default class LexerCustomAction extends LexerAction {\n    /**\n     * Constructs a custom lexer action with the specified rule and action\n     * indexes.\n     *\n     * @param ruleIndex The rule index to use for calls to\n     * {@link Recognizer//action}.\n     * @param actionIndex The action index to use for calls to\n     * {@link Recognizer//action}.\n     */\n    constructor(ruleIndex, actionIndex) {\n        super(LexerActionType.CUSTOM);\n        this.ruleIndex = ruleIndex;\n        this.actionIndex = actionIndex;\n        this.isPositionDependent = true;\n    }\n\n    /**\n     * <p>Custom actions are implemented by calling {@link Lexer//action} with the\n     * appropriate rule and action indexes.</p>\n     */\n    execute(lexer) {\n        lexer.action(null, this.ruleIndex, this.actionIndex);\n    }\n\n    updateHashCode(hash) {\n        hash.update(this.actionType, this.ruleIndex, this.actionIndex);\n    }\n\n    equals(other) {\n        if (this === other) {\n            return true;\n        } else if (! (other instanceof LexerCustomAction)) {\n            return false;\n        } else {\n            return this.ruleIndex === other.ruleIndex && this.actionIndex === other.actionIndex;\n        }\n    }\n}\n","/* Copyright (c) 2012-2022 The ANTLR Project Contributors. All rights reserved.\n * Use is of this file is governed by the BSD 3-clause license that\n * can be found in the LICENSE.txt file in the project root.\n */\nimport {default as LexerActionType } from \"../atn/LexerActionType.js\";\nimport LexerAction from \"./LexerAction.js\";\n\n/**\n * Implements the {@code more} lexer action by calling {@link Lexer//more}.\n *\n * <p>The {@code more} command does not have any parameters, so this action is\n * implemented as a singleton instance exposed by {@link //INSTANCE}.</p>\n */\nexport default class LexerMoreAction extends LexerAction {\n    constructor() {\n        super(LexerActionType.MORE);\n    }\n\n    /**\n     * <p>This action is implemented by calling {@link Lexer//popMode}.</p>\n     */\n    execute(lexer) {\n        lexer.more();\n    }\n\n    toString() {\n        return \"more\";\n    }\n}\n\nLexerMoreAction.INSTANCE = new LexerMoreAction();\n\n","/* Copyright (c) 2012-2022 The ANTLR Project Contributors. All rights reserved.\n * Use is of this file is governed by the BSD 3-clause license that\n * can be found in the LICENSE.txt file in the project root.\n */\nimport {default as LexerActionType } from \"../atn/LexerActionType.js\";\nimport LexerAction from \"./LexerAction.js\";\n\n/**\n * Implements the {@code type} lexer action by calling {@link Lexer//setType}\n * with the assigned type\n */\n\nexport default class LexerTypeAction extends LexerAction {\n    constructor(type) {\n        super(LexerActionType.TYPE);\n        this.type = type;\n    }\n\n    execute(lexer) {\n        lexer.type = this.type;\n    }\n\n    updateHashCode(hash) {\n        hash.update(this.actionType, this.type);\n    }\n\n    equals(other) {\n        if(this === other) {\n            return true;\n        } else if (! (other instanceof LexerTypeAction)) {\n            return false;\n        } else {\n            return this.type === other.type;\n        }\n    }\n\n    toString() {\n        return \"type(\" + this.type + \")\";\n    }\n}\n\n","/* Copyright (c) 2012-2022 The ANTLR Project Contributors. All rights reserved.\n * Use is of this file is governed by the BSD 3-clause license that\n * can be found in the LICENSE.txt file in the project root.\n */\nimport {default as LexerActionType } from \"../atn/LexerActionType.js\";\nimport LexerAction from \"./LexerAction.js\";\n\n/**\n * Implements the {@code pushMode} lexer action by calling\n * {@link Lexer//pushMode} with the assigned mode\n */\nexport default class LexerPushModeAction extends LexerAction {\n    constructor(mode) {\n        super(LexerActionType.PUSH_MODE);\n        this.mode = mode;\n    }\n\n    /**\n     * <p>This action is implemented by calling {@link Lexer//pushMode} with the\n     * value provided by {@link //getMode}.</p>\n     */\n    execute(lexer) {\n        lexer.pushMode(this.mode);\n    }\n\n    updateHashCode(hash) {\n        hash.update(this.actionType, this.mode);\n    }\n\n    equals(other) {\n        if (this === other) {\n            return true;\n        } else if (! (other instanceof LexerPushModeAction)) {\n            return false;\n        } else {\n            return this.mode === other.mode;\n        }\n    }\n\n    toString() {\n        return \"pushMode(\" + this.mode + \")\";\n    }\n}\n","/* Copyright (c) 2012-2022 The ANTLR Project Contributors. All rights reserved.\n * Use is of this file is governed by the BSD 3-clause license that\n * can be found in the LICENSE.txt file in the project root.\n */\nimport {default as LexerActionType } from \"../atn/LexerActionType.js\";\nimport LexerAction from \"./LexerAction.js\";\n\n/**\n * Implements the {@code popMode} lexer action by calling {@link Lexer//popMode}.\n *\n * <p>The {@code popMode} command does not have any parameters, so this action is\n * implemented as a singleton instance exposed by {@link //INSTANCE}.</p>\n */\nexport default class LexerPopModeAction extends LexerAction {\n    constructor() {\n        super(LexerActionType.POP_MODE);\n    }\n\n    /**\n     * <p>This action is implemented by calling {@link Lexer//popMode}.</p>\n     */\n    execute(lexer) {\n        lexer.popMode();\n    }\n\n    toString() {\n        return \"popMode\";\n    }\n}\n\nLexerPopModeAction.INSTANCE = new LexerPopModeAction();\n","/* Copyright (c) 2012-2022 The ANTLR Project Contributors. All rights reserved.\n * Use is of this file is governed by the BSD 3-clause license that\n * can be found in the LICENSE.txt file in the project root.\n */\nimport {default as LexerActionType } from \"../atn/LexerActionType.js\";\nimport LexerAction from \"./LexerAction.js\";\n\n/**\n * Implements the {@code mode} lexer action by calling {@link Lexer//mode} with\n * the assigned mode\n */\nexport default class LexerModeAction extends LexerAction {\n    constructor(mode) {\n        super(LexerActionType.MODE);\n        this.mode = mode;\n    }\n\n    /**\n     * <p>This action is implemented by calling {@link Lexer//mode} with the\n     * value provided by {@link //getMode}.</p>\n     */\n    execute(lexer) {\n        lexer.mode(this.mode);\n    }\n\n    updateHashCode(hash) {\n        hash.update(this.actionType, this.mode);\n    }\n\n    equals(other) {\n        if (this === other) {\n            return true;\n        } else if (! (other instanceof LexerModeAction)) {\n            return false;\n        } else {\n            return this.mode === other.mode;\n        }\n    }\n\n    toString() {\n        return \"mode(\" + this.mode + \")\";\n    }\n}\n","/* Copyright (c) 2012-2022 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause license that\n * can be found in the LICENSE.txt file in the project root.\n */\n\nimport Token from '../Token.js';\nimport ATN from './ATN.js';\nimport ATNType from './ATNType.js';\n\nimport ATNState from '../state/ATNState.js';\nimport BasicState from '../state/BasicState.js';\nimport DecisionState from '../state/DecisionState.js';\nimport BlockStartState from '../state/BlockStartState.js';\nimport BlockEndState from '../state/BlockEndState.js';\nimport LoopEndState from '../state/LoopEndState.js';\nimport RuleStartState from '../state/RuleStartState.js';\nimport RuleStopState from '../state/RuleStopState.js';\nimport TokensStartState from '../state/TokensStartState.js';\nimport PlusLoopbackState from '../state/PlusLoopbackState.js';\nimport StarLoopbackState from '../state/StarLoopbackState.js';\nimport StarLoopEntryState from '../state/StarLoopEntryState.js';\nimport PlusBlockStartState from '../state/PlusBlockStartState.js';\nimport StarBlockStartState from '../state/StarBlockStartState.js';\nimport BasicBlockStartState from '../state/BasicBlockStartState.js';\n\nimport Transition from '../transition/Transition.js';\nimport AtomTransition from '../transition/AtomTransition.js';\nimport SetTransition from '../transition/SetTransition.js';\nimport NotSetTransition from '../transition/NotSetTransition.js';\nimport RuleTransition from '../transition/RuleTransition.js';\nimport RangeTransition from '../transition/RangeTransition.js';\nimport ActionTransition from '../transition/ActionTransition.js';\nimport EpsilonTransition from '../transition/EpsilonTransition.js';\nimport WildcardTransition from '../transition/WildcardTransition.js';\nimport PredicateTransition from '../transition/PredicateTransition.js';\nimport PrecedencePredicateTransition from '../transition/PrecedencePredicateTransition.js';\n\n\nimport IntervalSet from '../misc/IntervalSet.js';\nimport ATNDeserializationOptions from './ATNDeserializationOptions.js';\n\nimport LexerActionType from './LexerActionType.js';\nimport LexerSkipAction from '../action/LexerSkipAction.js';\nimport LexerChannelAction from '../action/LexerChannelAction.js';\nimport LexerCustomAction from '../action/LexerCustomAction.js';\nimport LexerMoreAction from '../action/LexerMoreAction.js';\nimport LexerTypeAction from '../action/LexerTypeAction.js';\nimport LexerPushModeAction from '../action/LexerPushModeAction.js';\nimport LexerPopModeAction from '../action/LexerPopModeAction.js';\nimport LexerModeAction from '../action/LexerModeAction.js';\n\nconst SERIALIZED_VERSION = 4;\n\nfunction initArray( length, value) {\n\tconst tmp = [];\n\ttmp[length-1] = value;\n\treturn tmp.map(function(i) {return value;});\n}\n\nexport default class ATNDeserializer {\n\n    constructor(options) {\n        if ( options=== undefined || options === null ) {\n            options = ATNDeserializationOptions.defaultOptions;\n        }\n        this.deserializationOptions = options;\n        this.stateFactories = null;\n        this.actionFactories = null;\n    }\n\n    deserialize(data) {\n        const legacy = this.reset(data);\n        this.checkVersion(legacy);\n        if(legacy)\n            this.skipUUID();\n        const atn = this.readATN();\n        this.readStates(atn, legacy);\n        this.readRules(atn, legacy);\n        this.readModes(atn);\n        const sets = [];\n        this.readSets(atn, sets, this.readInt.bind(this));\n        if(legacy)\n            this.readSets(atn, sets, this.readInt32.bind(this));\n        this.readEdges(atn, sets);\n        this.readDecisions(atn);\n        this.readLexerActions(atn, legacy);\n        this.markPrecedenceDecisions(atn);\n        this.verifyATN(atn);\n        if (this.deserializationOptions.generateRuleBypassTransitions && atn.grammarType === ATNType.PARSER ) {\n            this.generateRuleBypassTransitions(atn);\n            // re-verify after modification\n            this.verifyATN(atn);\n        }\n        return atn;\n    }\n\n    reset(data) {\n        const version = data.charCodeAt ? data.charCodeAt(0) : data[0];\n        if(version === SERIALIZED_VERSION - 1) {\n            const adjust = function (c) {\n                const v = c.charCodeAt(0);\n                return v > 1 ? v - 2 : v + 65534;\n            };\n            const temp = data.split(\"\").map(adjust);\n            // don't adjust the first value since that's the version number\n            temp[0] = data.charCodeAt(0);\n            this.data = temp;\n            this.pos = 0;\n            return true;\n        } else {\n            this.data = data\n            this.pos = 0;\n            return false;\n        }\n    }\n\n    skipUUID() {\n        let count = 0;\n        while(count++ < 8)\n            this.readInt();\n    }\n\n    checkVersion(legacy) {\n        const version = this.readInt();\n        if ( !legacy && version !== SERIALIZED_VERSION ) {\n            throw (\"Could not deserialize ATN with version \" + version + \" (expected \" + SERIALIZED_VERSION + \").\");\n        }\n    }\n\n    readATN() {\n        const grammarType = this.readInt();\n        const maxTokenType = this.readInt();\n        return new ATN(grammarType, maxTokenType);\n    }\n\n    readStates(atn, legacy) {\n        let j, pair, stateNumber;\n        const  loopBackStateNumbers = [];\n        const  endStateNumbers = [];\n        const  nstates = this.readInt();\n        for(let i=0; i<nstates; i++) {\n            const  stype = this.readInt();\n            // ignore bad type of states\n            if (stype===ATNState.INVALID_TYPE) {\n                atn.addState(null);\n                continue;\n            }\n            let ruleIndex = this.readInt();\n            if (legacy && ruleIndex === 0xFFFF) {\n                ruleIndex = -1;\n            }\n            const  s = this.stateFactory(stype, ruleIndex);\n            if (stype === ATNState.LOOP_END) { // special case\n                const  loopBackStateNumber = this.readInt();\n                loopBackStateNumbers.push([s, loopBackStateNumber]);\n            } else if(s instanceof BlockStartState) {\n                const  endStateNumber = this.readInt();\n                endStateNumbers.push([s, endStateNumber]);\n            }\n            atn.addState(s);\n        }\n        // delay the assignment of loop back and end states until we know all the\n        // state instances have been initialized\n        for (j=0; j<loopBackStateNumbers.length; j++) {\n            pair = loopBackStateNumbers[j];\n            pair[0].loopBackState = atn.states[pair[1]];\n        }\n\n        for (j=0; j<endStateNumbers.length; j++) {\n            pair = endStateNumbers[j];\n            pair[0].endState = atn.states[pair[1]];\n        }\n\n        let numNonGreedyStates = this.readInt();\n        for (j=0; j<numNonGreedyStates; j++) {\n            stateNumber = this.readInt();\n            atn.states[stateNumber].nonGreedy = true;\n        }\n\n        let numPrecedenceStates = this.readInt();\n        for (j=0; j<numPrecedenceStates; j++) {\n            stateNumber = this.readInt();\n            atn.states[stateNumber].isPrecedenceRule = true;\n        }\n    }\n\n    readRules(atn, legacy) {\n        let i;\n        const nrules = this.readInt();\n        if (atn.grammarType === ATNType.LEXER ) {\n            atn.ruleToTokenType = initArray(nrules, 0);\n        }\n        atn.ruleToStartState = initArray(nrules, 0);\n        for (i=0; i<nrules; i++) {\n            const s = this.readInt();\n            atn.ruleToStartState[i] = atn.states[s];\n            if ( atn.grammarType === ATNType.LEXER ) {\n                let tokenType = this.readInt();\n                if (legacy && tokenType === 0xFFFF) {\n                    tokenType = Token.EOF;\n                }\n                atn.ruleToTokenType[i] = tokenType;\n            }\n        }\n        atn.ruleToStopState = initArray(nrules, 0);\n        for (i=0; i<atn.states.length; i++) {\n            const state = atn.states[i];\n            if (!(state instanceof RuleStopState)) {\n                continue;\n            }\n            atn.ruleToStopState[state.ruleIndex] = state;\n            atn.ruleToStartState[state.ruleIndex].stopState = state;\n        }\n    }\n\n    readModes(atn) {\n        const nmodes = this.readInt();\n        for (let i=0; i<nmodes; i++) {\n            let s = this.readInt();\n            atn.modeToStartState.push(atn.states[s]);\n        }\n    }\n\n    readSets(atn, sets, reader) {\n        const m = this.readInt();\n        for (let i=0; i<m; i++) {\n            const iset = new IntervalSet();\n            sets.push(iset);\n            const n = this.readInt();\n            const containsEof = this.readInt();\n            if (containsEof!==0) {\n                iset.addOne(-1);\n            }\n            for (let j=0; j<n; j++) {\n                const i1 = reader();\n                const i2 = reader();\n                iset.addRange(i1, i2);\n            }\n        }\n    }\n\n    readEdges(atn, sets) {\n        let i, j, state, trans, target;\n        const nedges = this.readInt();\n        for (i=0; i<nedges; i++) {\n            const src = this.readInt();\n            const trg = this.readInt();\n            const ttype = this.readInt();\n            const arg1 = this.readInt();\n            const arg2 = this.readInt();\n            const arg3 = this.readInt();\n            trans = this.edgeFactory(atn, ttype, src, trg, arg1, arg2, arg3, sets);\n            const srcState = atn.states[src];\n            srcState.addTransition(trans);\n        }\n        // edges for rule stop states can be derived, so they aren't serialized\n        for (i=0; i<atn.states.length; i++) {\n            state = atn.states[i];\n            for (j=0; j<state.transitions.length; j++) {\n                const t = state.transitions[j];\n                if (!(t instanceof RuleTransition)) {\n                    continue;\n                }\n                let outermostPrecedenceReturn = -1;\n                if (atn.ruleToStartState[t.target.ruleIndex].isPrecedenceRule) {\n                    if (t.precedence === 0) {\n                        outermostPrecedenceReturn = t.target.ruleIndex;\n                    }\n                }\n\n                trans = new EpsilonTransition(t.followState, outermostPrecedenceReturn);\n                atn.ruleToStopState[t.target.ruleIndex].addTransition(trans);\n            }\n        }\n\n        for (i=0; i<atn.states.length; i++) {\n            state = atn.states[i];\n            if (state instanceof BlockStartState) {\n                // we need to know the end state to set its start state\n                if (state.endState === null) {\n                    throw (\"IllegalState\");\n                }\n                // block end states can only be associated to a single block start\n                // state\n                if ( state.endState.startState !== null) {\n                    throw (\"IllegalState\");\n                }\n                state.endState.startState = state;\n            }\n            if (state instanceof PlusLoopbackState) {\n                for (j=0; j<state.transitions.length; j++) {\n                    target = state.transitions[j].target;\n                    if (target instanceof PlusBlockStartState) {\n                        target.loopBackState = state;\n                    }\n                }\n            } else if (state instanceof StarLoopbackState) {\n                for (j=0; j<state.transitions.length; j++) {\n                    target = state.transitions[j].target;\n                    if (target instanceof StarLoopEntryState) {\n                        target.loopBackState = state;\n                    }\n                }\n            }\n        }\n    }\n\n    readDecisions(atn) {\n        const ndecisions = this.readInt();\n        for (let i=0; i<ndecisions; i++) {\n            const s = this.readInt();\n            const decState = atn.states[s];\n            atn.decisionToState.push(decState);\n            decState.decision = i;\n        }\n    }\n\n    readLexerActions(atn, legacy) {\n        if (atn.grammarType === ATNType.LEXER) {\n            const count = this.readInt();\n            atn.lexerActions = initArray(count, null);\n            for (let i=0; i<count; i++) {\n                const actionType = this.readInt();\n                let data1 = this.readInt();\n                if (legacy && data1 === 0xFFFF) {\n                    data1 = -1;\n                }\n                let data2 = this.readInt();\n                if (legacy && data2 === 0xFFFF) {\n                    data2 = -1;\n                }\n                atn.lexerActions[i] = this.lexerActionFactory(actionType, data1, data2);\n            }\n        }\n    }\n\n    generateRuleBypassTransitions(atn) {\n        let i;\n        const count = atn.ruleToStartState.length;\n        for(i=0; i<count; i++) {\n            atn.ruleToTokenType[i] = atn.maxTokenType + i + 1;\n        }\n        for(i=0; i<count; i++) {\n            this.generateRuleBypassTransition(atn, i);\n        }\n    }\n\n    generateRuleBypassTransition(atn, idx) {\n        let i, state;\n        const bypassStart = new BasicBlockStartState();\n        bypassStart.ruleIndex = idx;\n        atn.addState(bypassStart);\n\n        const bypassStop = new BlockEndState();\n        bypassStop.ruleIndex = idx;\n        atn.addState(bypassStop);\n\n        bypassStart.endState = bypassStop;\n        atn.defineDecisionState(bypassStart);\n\n        bypassStop.startState = bypassStart;\n\n        let excludeTransition = null;\n        let endState = null;\n\n        if (atn.ruleToStartState[idx].isPrecedenceRule) {\n            // wrap from the beginning of the rule to the StarLoopEntryState\n            endState = null;\n            for(i=0; i<atn.states.length; i++) {\n                state = atn.states[i];\n                if (this.stateIsEndStateFor(state, idx)) {\n                    endState = state;\n                    excludeTransition = state.loopBackState.transitions[0];\n                    break;\n                }\n            }\n            if (excludeTransition === null) {\n                throw (\"Couldn't identify final state of the precedence rule prefix section.\");\n            }\n        } else {\n            endState = atn.ruleToStopState[idx];\n        }\n\n        // all non-excluded transitions that currently target end state need to\n        // target blockEnd instead\n        for(i=0; i<atn.states.length; i++) {\n            state = atn.states[i];\n            for(let j=0; j<state.transitions.length; j++) {\n                const transition = state.transitions[j];\n                if (transition === excludeTransition) {\n                    continue;\n                }\n                if (transition.target === endState) {\n                    transition.target = bypassStop;\n                }\n            }\n        }\n\n        // all transitions leaving the rule start state need to leave blockStart\n        // instead\n        const ruleToStartState = atn.ruleToStartState[idx];\n        const count = ruleToStartState.transitions.length;\n        while ( count > 0) {\n            bypassStart.addTransition(ruleToStartState.transitions[count-1]);\n            ruleToStartState.transitions = ruleToStartState.transitions.slice(-1);\n        }\n        // link the new states\n        atn.ruleToStartState[idx].addTransition(new EpsilonTransition(bypassStart));\n        bypassStop.addTransition(new EpsilonTransition(endState));\n\n        const matchState = new BasicState();\n        atn.addState(matchState);\n        matchState.addTransition(new AtomTransition(bypassStop, atn.ruleToTokenType[idx]));\n        bypassStart.addTransition(new EpsilonTransition(matchState));\n    }\n\n    stateIsEndStateFor(state, idx) {\n        if ( state.ruleIndex !== idx) {\n            return null;\n        }\n        if (!( state instanceof StarLoopEntryState)) {\n            return null;\n        }\n        const maybeLoopEndState = state.transitions[state.transitions.length - 1].target;\n        if (!( maybeLoopEndState instanceof LoopEndState)) {\n            return null;\n        }\n        if (maybeLoopEndState.epsilonOnlyTransitions &&\n            (maybeLoopEndState.transitions[0].target instanceof RuleStopState)) {\n            return state;\n        } else {\n            return null;\n        }\n    }\n\n    /**\n     * Analyze the {@link StarLoopEntryState} states in the specified ATN to set\n     * the {@link StarLoopEntryState//isPrecedenceDecision} field to the\n     * correct value.\n     * @param atn The ATN.\n     */\n    markPrecedenceDecisions(atn) {\n        for(let i=0; i<atn.states.length; i++) {\n            const state = atn.states[i];\n            if (!( state instanceof StarLoopEntryState)) {\n                continue;\n            }\n            // We analyze the ATN to determine if this ATN decision state is the\n            // decision for the closure block that determines whether a\n            // precedence rule should continue or complete.\n            if ( atn.ruleToStartState[state.ruleIndex].isPrecedenceRule) {\n                const maybeLoopEndState = state.transitions[state.transitions.length - 1].target;\n                if (maybeLoopEndState instanceof LoopEndState) {\n                    if ( maybeLoopEndState.epsilonOnlyTransitions &&\n                            (maybeLoopEndState.transitions[0].target instanceof RuleStopState)) {\n                        state.isPrecedenceDecision = true;\n                    }\n                }\n            }\n        }\n    }\n\n    verifyATN(atn) {\n        if (!this.deserializationOptions.verifyATN) {\n            return;\n        }\n        // verify assumptions\n        for(let i=0; i<atn.states.length; i++) {\n            const state = atn.states[i];\n            if (state === null) {\n                continue;\n            }\n            this.checkCondition(state.epsilonOnlyTransitions || state.transitions.length <= 1);\n            if (state instanceof PlusBlockStartState) {\n                this.checkCondition(state.loopBackState !== null);\n            } else  if (state instanceof StarLoopEntryState) {\n                this.checkCondition(state.loopBackState !== null);\n                this.checkCondition(state.transitions.length === 2);\n                if (state.transitions[0].target instanceof StarBlockStartState) {\n                    this.checkCondition(state.transitions[1].target instanceof LoopEndState);\n                    this.checkCondition(!state.nonGreedy);\n                } else if (state.transitions[0].target instanceof LoopEndState) {\n                    this.checkCondition(state.transitions[1].target instanceof StarBlockStartState);\n                    this.checkCondition(state.nonGreedy);\n                } else {\n                    throw(\"IllegalState\");\n                }\n            } else if (state instanceof StarLoopbackState) {\n                this.checkCondition(state.transitions.length === 1);\n                this.checkCondition(state.transitions[0].target instanceof StarLoopEntryState);\n            } else if (state instanceof LoopEndState) {\n                this.checkCondition(state.loopBackState !== null);\n            } else if (state instanceof RuleStartState) {\n                this.checkCondition(state.stopState !== null);\n            } else if (state instanceof BlockStartState) {\n                this.checkCondition(state.endState !== null);\n            } else if (state instanceof BlockEndState) {\n                this.checkCondition(state.startState !== null);\n            } else if (state instanceof DecisionState) {\n                this.checkCondition(state.transitions.length <= 1 || state.decision >= 0);\n            } else {\n                this.checkCondition(state.transitions.length <= 1 || (state instanceof RuleStopState));\n            }\n        }\n    }\n\n    checkCondition(condition, message) {\n        if (!condition) {\n            if (message === undefined || message===null) {\n                message = \"IllegalState\";\n            }\n            throw (message);\n        }\n    }\n\n    readInt() {\n        return this.data[this.pos++];\n    }\n\n    readInt32() {\n        const low = this.readInt();\n        const high = this.readInt();\n        return low | (high << 16);\n    }\n\n    edgeFactory(atn, type, src, trg, arg1, arg2, arg3, sets) {\n        const target = atn.states[trg];\n        switch(type) {\n        case Transition.EPSILON:\n            return new EpsilonTransition(target);\n        case Transition.RANGE:\n            return arg3 !== 0 ? new RangeTransition(target, Token.EOF, arg2) : new RangeTransition(target, arg1, arg2);\n        case Transition.RULE:\n            return new RuleTransition(atn.states[arg1], arg2, arg3, target);\n        case Transition.PREDICATE:\n            return new PredicateTransition(target, arg1, arg2, arg3 !== 0);\n        case Transition.PRECEDENCE:\n            return new PrecedencePredicateTransition(target, arg1);\n        case Transition.ATOM:\n            return arg3 !== 0 ? new AtomTransition(target, Token.EOF) : new AtomTransition(target, arg1);\n        case Transition.ACTION:\n            return new ActionTransition(target, arg1, arg2, arg3 !== 0);\n        case Transition.SET:\n            return new SetTransition(target, sets[arg1]);\n        case Transition.NOT_SET:\n            return new NotSetTransition(target, sets[arg1]);\n        case Transition.WILDCARD:\n            return new WildcardTransition(target);\n        default:\n            throw \"The specified transition type: \" + type + \" is not valid.\";\n        }\n    }\n\n    stateFactory(type, ruleIndex) {\n        if (this.stateFactories === null) {\n            const sf = [];\n            sf[ATNState.INVALID_TYPE] = null;\n            sf[ATNState.BASIC] = () => new BasicState();\n            sf[ATNState.RULE_START] = () => new RuleStartState();\n            sf[ATNState.BLOCK_START] = () => new BasicBlockStartState();\n            sf[ATNState.PLUS_BLOCK_START] = () => new PlusBlockStartState();\n            sf[ATNState.STAR_BLOCK_START] = () => new StarBlockStartState();\n            sf[ATNState.TOKEN_START] = () => new TokensStartState();\n            sf[ATNState.RULE_STOP] = () => new RuleStopState();\n            sf[ATNState.BLOCK_END] = () => new BlockEndState();\n            sf[ATNState.STAR_LOOP_BACK] = () => new StarLoopbackState();\n            sf[ATNState.STAR_LOOP_ENTRY] = () => new StarLoopEntryState();\n            sf[ATNState.PLUS_LOOP_BACK] = () => new PlusLoopbackState();\n            sf[ATNState.LOOP_END] = () => new LoopEndState();\n            this.stateFactories = sf;\n        }\n        if (type>this.stateFactories.length || this.stateFactories[type] === null) {\n            throw(\"The specified state type \" + type + \" is not valid.\");\n        } else {\n            const s = this.stateFactories[type]();\n            if (s!==null) {\n                s.ruleIndex = ruleIndex;\n                return s;\n            }\n        }\n    }\n\n    lexerActionFactory(type, data1, data2) {\n        if (this.actionFactories === null) {\n            const af = [];\n            af[LexerActionType.CHANNEL] = (data1, data2) => new LexerChannelAction(data1);\n            af[LexerActionType.CUSTOM] = (data1, data2) => new LexerCustomAction(data1, data2);\n            af[LexerActionType.MODE] = (data1, data2) => new LexerModeAction(data1);\n            af[LexerActionType.MORE] = (data1, data2) => LexerMoreAction.INSTANCE;\n            af[LexerActionType.POP_MODE] = (data1, data2) => LexerPopModeAction.INSTANCE;\n            af[LexerActionType.PUSH_MODE] = (data1, data2) => new LexerPushModeAction(data1);\n            af[LexerActionType.SKIP] = (data1, data2) => LexerSkipAction.INSTANCE;\n            af[LexerActionType.TYPE] = (data1, data2) => new LexerTypeAction(data1);\n            this.actionFactories = af;\n        }\n        if (type>this.actionFactories.length || this.actionFactories[type] === null) {\n            throw(\"The specified lexer action type \" + type + \" is not valid.\");\n        } else {\n            return this.actionFactories[type](data1, data2);\n        }\n    }\n}\n\n","/* Copyright (c) 2012-2022 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause license that\n * can be found in the LICENSE.txt file in the project root.\n */\n\n/**\n * Represents the type of recognizer an ATN applies to\n */\nexport default {\n    LEXER: 0,\n    PARSER: 1\n};\n\n","/* Copyright (c) 2012-2022 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause license that\n * can be found in the LICENSE.txt file in the project root.\n */\n\n/**\n * Provides an empty default implementation of {@link ANTLRErrorListener}. The\n * default implementation of each method does nothing, but can be overridden as\n * necessary.\n */\nexport default class ErrorListener {\n    syntaxError(recognizer, offendingSymbol, line, column, msg, e) {\n    }\n\n    reportAmbiguity(recognizer, dfa, startIndex, stopIndex, exact, ambigAlts, configs) {\n    }\n\n    reportAttemptingFullContext(recognizer, dfa, startIndex, stopIndex, conflictingAlts, configs) {\n    }\n\n    reportContextSensitivity(recognizer, dfa, startIndex, stopIndex, prediction, configs) {\n    }\n}\n","/* Copyright (c) 2012-2022 The ANTLR Project Contributors. All rights reserved.\n * Use is of this file is governed by the BSD 3-clause license that\n * can be found in the LICENSE.txt file in the project root.\n */\nimport ErrorListener from \"./ErrorListener.js\";\n\n/**\n * {@inheritDoc}\n *\n * <p>\n * This implementation prints messages to {@link System//err} containing the\n * values of {@code line}, {@code charPositionInLine}, and {@code msg} using\n * the following format.</p>\n *\n * <pre>\n * line <em>line</em>:<em>charPositionInLine</em> <em>msg</em>\n * </pre>\n *\n */\nexport default class ConsoleErrorListener extends ErrorListener {\n    constructor() {\n        super();\n    }\n\n    syntaxError(recognizer, offendingSymbol, line, column, msg, e) {\n        console.error(\"line \" + line + \":\" + column + \" \" + msg);\n    }\n}\n\n\n/**\n * Provides a default instance of {@link ConsoleErrorListener}.\n */\nConsoleErrorListener.INSTANCE = new ConsoleErrorListener();\n","/* Copyright (c) 2012-2022 The ANTLR Project Contributors. All rights reserved.\n * Use is of this file is governed by the BSD 3-clause license that\n * can be found in the LICENSE.txt file in the project root.\n */\nimport ErrorListener from \"./ErrorListener.js\";\n\nexport default class ProxyErrorListener extends ErrorListener {\n    constructor(delegates) {\n        super();\n        if (delegates===null) {\n            throw \"delegates\";\n        }\n        this.delegates = delegates;\n        return this;\n    }\n\n    syntaxError(recognizer, offendingSymbol, line, column, msg, e) {\n        this.delegates.map(d => d.syntaxError(recognizer, offendingSymbol, line, column, msg, e));\n    }\n\n    reportAmbiguity(recognizer, dfa, startIndex, stopIndex, exact, ambigAlts, configs) {\n        this.delegates.map(d => d.reportAmbiguity(recognizer, dfa, startIndex, stopIndex, exact, ambigAlts, configs));\n    }\n\n    reportAttemptingFullContext(recognizer, dfa, startIndex, stopIndex, conflictingAlts, configs) {\n        this.delegates.map(d => d.reportAttemptingFullContext(recognizer, dfa, startIndex, stopIndex, conflictingAlts, configs));\n    }\n\n    reportContextSensitivity(recognizer, dfa, startIndex, stopIndex, prediction, configs) {\n        this.delegates.map(d => d.reportContextSensitivity(recognizer, dfa, startIndex, stopIndex, prediction, configs));\n    }\n}\n","/* Copyright (c) 2012-2022 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause license that\n * can be found in the LICENSE.txt file in the project root.\n */\n\nimport Token from './Token.js';\nimport ConsoleErrorListener from './error/ConsoleErrorListener.js';\nimport ProxyErrorListener from './error/ProxyErrorListener.js';\n\nexport default class Recognizer {\n    constructor() {\n        this._listeners = [ ConsoleErrorListener.INSTANCE ];\n        this._interp = null;\n        this._stateNumber = -1;\n    }\n\n    checkVersion(toolVersion) {\n        const runtimeVersion = \"4.13.0\";\n        if (runtimeVersion!==toolVersion) {\n            console.log(\"ANTLR runtime and generated code versions disagree: \"+runtimeVersion+\"!=\"+toolVersion);\n        }\n    }\n\n    addErrorListener(listener) {\n        this._listeners.push(listener);\n    }\n\n    removeErrorListeners() {\n        this._listeners = [];\n    }\n\n    getLiteralNames() {\n        return Object.getPrototypeOf(this).constructor.literalNames || [];\n    }\n\n    getSymbolicNames() {\n        return Object.getPrototypeOf(this).constructor.symbolicNames || [];\n    }\n\n    getTokenNames() {\n        if(!this.tokenNames) {\n            const literalNames = this.getLiteralNames();\n            const symbolicNames = this.getSymbolicNames();\n            const length = literalNames.length > symbolicNames.length ? literalNames.length : symbolicNames.length;\n            this.tokenNames = [];\n            for(let i=0; i<length; i++) {\n                this.tokenNames[i] = literalNames[i] || symbolicNames[i] || \"<INVALID\";\n            }\n        }\n        return this.tokenNames;\n    }\n\n    getTokenTypeMap() {\n        const tokenNames = this.getTokenNames();\n        if (tokenNames===null) {\n            throw(\"The current recognizer does not provide a list of token names.\");\n        }\n        let result = this.tokenTypeMapCache[tokenNames];\n        if(result===undefined) {\n            result = tokenNames.reduce(function(o, k, i) { o[k] = i; });\n            result.EOF = Token.EOF;\n            this.tokenTypeMapCache[tokenNames] = result;\n        }\n        return result;\n    }\n\n    /**\n     * Get a map from rule names to rule indexes.\n     * <p>Used for XPath and tree pattern compilation.</p>\n     */\n    getRuleIndexMap() {\n        const ruleNames = this.ruleNames;\n        if (ruleNames===null) {\n            throw(\"The current recognizer does not provide a list of rule names.\");\n        }\n        let result = this.ruleIndexMapCache[ruleNames]; // todo: should it be Recognizer.ruleIndexMapCache ?\n        if(result===undefined) {\n            result = ruleNames.reduce(function(o, k, i) { o[k] = i; });\n            this.ruleIndexMapCache[ruleNames] = result;\n        }\n        return result;\n    }\n\n    getTokenType(tokenName) {\n        const ttype = this.getTokenTypeMap()[tokenName];\n        if (ttype !==undefined) {\n            return ttype;\n        } else {\n            return Token.INVALID_TYPE;\n        }\n    }\n\n    // What is the error header, normally line/character position information?\n    getErrorHeader(e) {\n        const line = e.getOffendingToken().line;\n        const column = e.getOffendingToken().column;\n        return \"line \" + line + \":\" + column;\n    }\n\n    /**\n     * How should a token be displayed in an error message? The default\n     * is to display just the text, but during development you might\n     * want to have a lot of information spit out.  Override in that case\n     * to use t.toString() (which, for CommonToken, dumps everything about\n     * the token). This is better than forcing you to override a method in\n     * your token objects because you don't have to go modify your lexer\n     * so that it creates a new Java type.\n     *\n     * @deprecated This method is not called by the ANTLR 4 Runtime. Specific\n     * implementations of {@link ANTLRErrorStrategy} may provide a similar\n     * feature when necessary. For example, see\n     * {@link DefaultErrorStrategy//getTokenErrorDisplay}.*/\n    getTokenErrorDisplay(t) {\n        if (t===null) {\n            return \"<no token>\";\n        }\n        let s = t.text;\n        if (s===null) {\n            if (t.type===Token.EOF) {\n                s = \"<EOF>\";\n            } else {\n                s = \"<\" + t.type + \">\";\n            }\n        }\n        s = s.replace(\"\\n\",\"\\\\n\").replace(\"\\r\",\"\\\\r\").replace(\"\\t\",\"\\\\t\");\n        return \"'\" + s + \"'\";\n    }\n\n    getErrorListenerDispatch() {\n        return new ProxyErrorListener(this._listeners);\n    }\n\n    /**\n     * subclass needs to override these if there are sempreds or actions\n     * that the ATN interp needs to execute\n     */\n    sempred(localctx, ruleIndex, actionIndex) {\n        return true;\n    }\n\n    precpred(localctx , precedence) {\n        return true;\n    }\n\n    get atn() {\n        return this._interp.atn;\n    }\n\n    get state(){\n        return this._stateNumber;\n    }\n\n    set state(state) {\n        this._stateNumber = state;\n    }\n}\n\nRecognizer.tokenTypeMapCache = {};\nRecognizer.ruleIndexMapCache = {};\n","import Token from \"./Token.js\";\n\nexport default class CommonToken extends Token {\n    constructor(source, type, channel, start, stop) {\n        super();\n        this.source = source !== undefined ? source : CommonToken.EMPTY_SOURCE;\n        this.type = type !== undefined ? type : null;\n        this.channel = channel !== undefined ? channel : Token.DEFAULT_CHANNEL;\n        this.start = start !== undefined ? start : -1;\n        this.stop = stop !== undefined ? stop : -1;\n        this.tokenIndex = -1;\n        if (this.source[0] !== null) {\n            this.line = source[0].line;\n            this.column = source[0].column;\n        } else {\n            this.column = -1;\n        }\n    }\n\n    /**\n     * Constructs a new {@link CommonToken} as a copy of another {@link Token}.\n     *\n     * <p>\n     * If {@code oldToken} is also a {@link CommonToken} instance, the newly\n     * constructed token will share a reference to the {@link //text} field and\n     * the {@link Pair} stored in {@link //source}. Otherwise, {@link //text} will\n     * be assigned the result of calling {@link //getText}, and {@link //source}\n     * will be constructed from the result of {@link Token//getTokenSource} and\n     * {@link Token//getInputStream}.</p>\n     *\n     * @param oldToken The token to copy.\n     */\n    clone() {\n        const t = new CommonToken(this.source, this.type, this.channel, this.start, this.stop);\n        t.tokenIndex = this.tokenIndex;\n        t.line = this.line;\n        t.column = this.column;\n        t.text = this.text;\n        return t;\n    }\n\n    cloneWithType(type) {\n        const t = new CommonToken(this.source, type, this.channel, this.start, this.stop);\n        t.tokenIndex = this.tokenIndex;\n        t.line = this.line;\n        t.column = this.column;\n        if (type === Token.EOF)\n            t.text = \"\";\n        return t;\n    }\n\n    toString() {\n        let txt = this.text;\n        if (txt !== null) {\n            txt = txt.replace(/\\n/g, \"\\\\n\").replace(/\\r/g, \"\\\\r\").replace(/\\t/g, \"\\\\t\");\n        } else {\n            txt = \"<no text>\";\n        }\n        return \"[@\" + this.tokenIndex + \",\" + this.start + \":\" + this.stop + \"='\" +\n            txt + \"',<\" + this.type + \">\" +\n            (this.channel > 0 ? \",channel=\" + this.channel : \"\") + \",\" +\n            this.line + \":\" + this.column + \"]\";\n    }\n\n    get text(){\n        if (this._text !== null) {\n            return this._text;\n        }\n        const input = this.getInputStream();\n        if (input === null) {\n            return null;\n        }\n        const n = input.size;\n        if (this.start < n && this.stop < n) {\n            return input.getText(this.start, this.stop);\n        } else {\n            return \"<EOF>\";\n        }\n    }\n\n    set text(text) {\n        this._text = text;\n    }\n}\n\n/**\n * An empty {@link Pair} which is used as the default value of\n * {@link //source} for tokens that do not have a source.\n */\nCommonToken.EMPTY_SOURCE = [ null, null ];\n","/* Copyright (c) 2012-2022 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause license that\n * can be found in the LICENSE.txt file in the project root.\n */\n\nimport CommonToken from './CommonToken.js';\n\nclass TokenFactory {}\n\n/**\n * This default implementation of {@link TokenFactory} creates\n * {@link CommonToken} objects.\n */\nexport default class CommonTokenFactory extends TokenFactory {\n    constructor(copyText) {\n        super();\n        /**\n         * Indicates whether {@link CommonToken//setText} should be called after\n         * constructing tokens to explicitly set the text. This is useful for cases\n         * where the input stream might not be able to provide arbitrary substrings\n         * of text from the input after the lexer creates a token (e.g. the\n         * implementation of {@link CharStream//getText} in\n         * {@link UnbufferedCharStream} throws an\n         * {@link UnsupportedOperationException}). Explicitly setting the token text\n         * allows {@link Token//getText} to be called at any time regardless of the\n         * input stream implementation.\n         *\n         * <p>\n         * The default value is {@code false} to avoid the performance and memory\n         * overhead of copying text for every token unless explicitly requested.</p>\n         */\n        this.copyText = copyText===undefined ? false : copyText;\n    }\n\n    create(source, type, text, channel, start, stop, line, column) {\n        const t = new CommonToken(source, type, channel, start, stop);\n        t.line = line;\n        t.column = column;\n        if (text !==null) {\n            t.text = text;\n        } else if (this.copyText && source[1] !==null) {\n            t.text = source[1].getText(start,stop);\n        }\n        return t;\n    }\n\n    createThin(type, text) {\n        const t = new CommonToken(null, type);\n        t.text = text;\n        return t;\n    }\n}\n\n/**\n * The default {@link CommonTokenFactory} instance.\n *\n * <p>\n * This token factory does not explicitly copy token text when constructing\n * tokens.</p>\n */\nCommonTokenFactory.DEFAULT = new CommonTokenFactory();\n","/* Copyright (c) 2012-2022 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause license that\n * can be found in the LICENSE.txt file in the project root.\n */\n\n/**\n * The root of the ANTLR exception hierarchy. In general, ANTLR tracks just\n *  3 kinds of errors: prediction errors, failed predicate errors, and\n *  mismatched input errors. In each case, the parser knows where it is\n *  in the input, where it is in the ATN, the rule invocation stack,\n *  and what kind of problem occurred.\n */\n\nexport default class RecognitionException extends Error {\n\n    constructor(params) {\n        super(params.message);\n        if (Error.captureStackTrace)\n            Error.captureStackTrace(this, RecognitionException);\n        this.message = params.message;\n        this.recognizer = params.recognizer;\n        this.input = params.input;\n        this.ctx = params.ctx;\n        /**\n         * The current {@link Token} when an error occurred. Since not all streams\n         * support accessing symbols by index, we have to track the {@link Token}\n         * instance itself\n        */\n        this.offendingToken = null;\n        /**\n         * Get the ATN state number the parser was in at the time the error\n         * occurred. For {@link NoViableAltException} and\n         * {@link LexerNoViableAltException} exceptions, this is the\n         * {@link DecisionState} number. For others, it is the state whose outgoing\n         * edge we couldn't match.\n         */\n        this.offendingState = -1;\n        if (this.recognizer!==null) {\n            this.offendingState = this.recognizer.state;\n        }\n    }\n\n    /**\n     * Gets the set of input symbols which could potentially follow the\n     * previously matched symbol at the time this exception was thrown.\n     *\n     * <p>If the set of expected tokens is not known and could not be computed,\n     * this method returns {@code null}.</p>\n     *\n     * @return The set of token types that could potentially follow the current\n     * state in the ATN, or {@code null} if the information is not available.\n     */\n    getExpectedTokens() {\n        if (this.recognizer!==null) {\n            return this.recognizer.atn.getExpectedTokens(this.offendingState, this.ctx);\n        } else {\n            return null;\n        }\n    }\n\n    // <p>If the state number is not known, this method returns -1.</p>\n    toString() {\n        return this.message;\n    }\n}\n\n\n\n","/* Copyright (c) 2012-2022 The ANTLR Project Contributors. All rights reserved.\n * Use is of this file is governed by the BSD 3-clause license that\n * can be found in the LICENSE.txt file in the project root.\n */\nimport Interval from \"../misc/Interval.js\";\nimport RecognitionException from \"./RecognitionException.js\";\n\nexport default class LexerNoViableAltException extends RecognitionException {\n    constructor(lexer, input, startIndex, deadEndConfigs) {\n        super({message: \"\", recognizer: lexer, input: input, ctx: null});\n        this.startIndex = startIndex;\n        this.deadEndConfigs = deadEndConfigs;\n    }\n\n    toString() {\n        let symbol = \"\";\n        if (this.startIndex >= 0 && this.startIndex < this.input.size) {\n            symbol = this.input.getText(new Interval(this.startIndex,this.startIndex));\n        }\n        return \"LexerNoViableAltException\" + symbol;\n    }\n}\n","/* Copyright (c) 2012-2022 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause license that\n * can be found in the LICENSE.txt file in the project root.\n */\n\nimport Token from './Token.js';\nimport Recognizer from './Recognizer.js';\nimport CommonTokenFactory from './CommonTokenFactory.js';\nimport RecognitionException from './error/RecognitionException.js';\nimport LexerNoViableAltException from './error/LexerNoViableAltException.js';\n\n/**\n * A lexer is recognizer that draws input symbols from a character stream.\n * lexer grammars result in a subclass of this object. A Lexer object\n * uses simplified match() and error recovery mechanisms in the interest of speed.\n */\nexport default class Lexer extends Recognizer {\n\tconstructor(input) {\n\t\tsuper();\n\t\tthis._input = input;\n\t\tthis._factory = CommonTokenFactory.DEFAULT;\n\t\tthis._tokenFactorySourcePair = [ this, input ];\n\n\t\tthis._interp = null; // child classes must populate this\n\n\t\t/**\n\t\t * The goal of all lexer rules/methods is to create a token object.\n\t\t * this is an instance variable as multiple rules may collaborate to\n\t\t * create a single token. nextToken will return this object after\n\t\t * matching lexer rule(s). If you subclass to allow multiple token\n\t\t * emissions, then set this to the last token to be matched or\n\t\t * something nonnull so that the auto token emit mechanism will not\n\t\t * emit another token.\n\t\t */\n\t\tthis._token = null;\n\n\t\t/**\n\t\t * What character index in the stream did the current token start at?\n\t\t * Needed, for example, to get the text for current token. Set at\n\t\t * the start of nextToken.\n\t\t */\n\t\tthis._tokenStartCharIndex = -1;\n\n\t\t// The line on which the first character of the token resides///\n\t\tthis._tokenStartLine = -1;\n\n\t\t// The character position of first character within the line///\n\t\tthis._tokenStartColumn = -1;\n\n\t\t// Once we see EOF on char stream, next token will be EOF.\n\t\t// If you have DONE : EOF ; then you see DONE EOF.\n\t\tthis._hitEOF = false;\n\n\t\t// The channel number for the current token///\n\t\tthis._channel = Token.DEFAULT_CHANNEL;\n\n\t\t// The token type for the current token///\n\t\tthis._type = Token.INVALID_TYPE;\n\n\t\tthis._modeStack = [];\n\t\tthis._mode = Lexer.DEFAULT_MODE;\n\n\t\t/**\n\t\t * You can set the text for the current token to override what is in\n\t\t * the input char buffer. Use setText() or can set this instance var.\n\t\t */\n\t\tthis._text = null;\n\t}\n\n\treset() {\n\t\t// wack Lexer state variables\n\t\tif (this._input !== null) {\n\t\t\tthis._input.seek(0); // rewind the input\n\t\t}\n\t\tthis._token = null;\n\t\tthis._type = Token.INVALID_TYPE;\n\t\tthis._channel = Token.DEFAULT_CHANNEL;\n\t\tthis._tokenStartCharIndex = -1;\n\t\tthis._tokenStartColumn = -1;\n\t\tthis._tokenStartLine = -1;\n\t\tthis._text = null;\n\n\t\tthis._hitEOF = false;\n\t\tthis._mode = Lexer.DEFAULT_MODE;\n\t\tthis._modeStack = [];\n\n\t\tthis._interp.reset();\n\t}\n\n// Return a token from this source; i.e., match a token on the char stream.\n\tnextToken() {\n\t\tif (this._input === null) {\n\t\t\tthrow \"nextToken requires a non-null input stream.\";\n\t\t}\n\n\t\t/**\n\t\t * Mark start location in char stream so unbuffered streams are\n\t\t * guaranteed at least have text of current token\n\t\t */\n\t\tconst tokenStartMarker = this._input.mark();\n\t\ttry {\n\t\t\tfor (;;) {\n\t\t\t\tif (this._hitEOF) {\n\t\t\t\t\tthis.emitEOF();\n\t\t\t\t\treturn this._token;\n\t\t\t\t}\n\t\t\t\tthis._token = null;\n\t\t\t\tthis._channel = Token.DEFAULT_CHANNEL;\n\t\t\t\tthis._tokenStartCharIndex = this._input.index;\n\t\t\t\tthis._tokenStartColumn = this._interp.column;\n\t\t\t\tthis._tokenStartLine = this._interp.line;\n\t\t\t\tthis._text = null;\n\t\t\t\tlet continueOuter = false;\n\t\t\t\tfor (;;) {\n\t\t\t\t\tthis._type = Token.INVALID_TYPE;\n\t\t\t\t\tlet ttype = Lexer.SKIP;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tttype = this._interp.match(this._input, this._mode);\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\tif(e instanceof RecognitionException) {\n\t\t\t\t\t\t\tthis.notifyListeners(e); // report error\n\t\t\t\t\t\t\tthis.recover(e);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tconsole.log(e.stack);\n\t\t\t\t\t\t\tthrow e;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (this._input.LA(1) === Token.EOF) {\n\t\t\t\t\t\tthis._hitEOF = true;\n\t\t\t\t\t}\n\t\t\t\t\tif (this._type === Token.INVALID_TYPE) {\n\t\t\t\t\t\tthis._type = ttype;\n\t\t\t\t\t}\n\t\t\t\t\tif (this._type === Lexer.SKIP) {\n\t\t\t\t\t\tcontinueOuter = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif (this._type !== Lexer.MORE) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (continueOuter) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (this._token === null) {\n\t\t\t\t\tthis.emit();\n\t\t\t\t}\n\t\t\t\treturn this._token;\n\t\t\t}\n\t\t} finally {\n\t\t\t// make sure we release marker after match or\n\t\t\t// unbuffered char stream will keep buffering\n\t\t\tthis._input.release(tokenStartMarker);\n\t\t}\n\t}\n\n\t/**\n\t * Instruct the lexer to skip creating a token for current lexer rule\n\t * and look for another token. nextToken() knows to keep looking when\n\t * a lexer rule finishes with token set to SKIP_TOKEN. Recall that\n\t * if token==null at end of any token rule, it creates one for you\n\t * and emits it.\n\t */\n\tskip() {\n\t\tthis._type = Lexer.SKIP;\n\t}\n\n\tmore() {\n\t\tthis._type = Lexer.MORE;\n\t}\n\n\tmode(m) {\n\t\tthis._mode = m;\n\t}\n\n\tpushMode(m) {\n\t\tif (this._interp.debug) {\n\t\t\tconsole.log(\"pushMode \" + m);\n\t\t}\n\t\tthis._modeStack.push(this._mode);\n\t\tthis.mode(m);\n\t}\n\n\tpopMode() {\n\t\tif (this._modeStack.length === 0) {\n\t\t\tthrow \"Empty Stack\";\n\t\t}\n\t\tif (this._interp.debug) {\n\t\t\tconsole.log(\"popMode back to \" + this._modeStack.slice(0, -1));\n\t\t}\n\t\tthis.mode(this._modeStack.pop());\n\t\treturn this._mode;\n\t}\n\n\t/**\n\t * By default does not support multiple emits per nextToken invocation\n\t * for efficiency reasons. Subclass and override this method, nextToken,\n\t * and getToken (to push tokens into a list and pull from that list\n\t * rather than a single variable as this implementation does).\n\t */\n\temitToken(token) {\n\t\tthis._token = token;\n\t}\n\n\t/**\n\t * The standard method called to automatically emit a token at the\n\t * outermost lexical rule. The token object should point into the\n\t * char buffer start..stop. If there is a text override in 'text',\n\t * use that to set the token's text. Override this method to emit\n\t * custom Token objects or provide a new factory.\n\t */\n\temit() {\n\t\tconst t = this._factory.create(this._tokenFactorySourcePair, this._type,\n\t\t\t\tthis._text, this._channel, this._tokenStartCharIndex, this\n\t\t\t\t\t\t.getCharIndex() - 1, this._tokenStartLine,\n\t\t\t\tthis._tokenStartColumn);\n\t\tthis.emitToken(t);\n\t\treturn t;\n\t}\n\n\temitEOF() {\n\t\tconst cpos = this.column;\n\t\tconst lpos = this.line;\n\t\tconst eof = this._factory.create(this._tokenFactorySourcePair, Token.EOF,\n\t\t\t\tnull, Token.DEFAULT_CHANNEL, this._input.index,\n\t\t\t\tthis._input.index - 1, lpos, cpos);\n\t\tthis.emitToken(eof);\n\t\treturn eof;\n\t}\n\n// What is the index of the current character of lookahead?///\n\tgetCharIndex() {\n\t\treturn this._input.index;\n\t}\n\n\t/**\n\t * Return a list of all Token objects in input char stream.\n\t * Forces load of all tokens. Does not include EOF token.\n\t */\n\tgetAllTokens() {\n\t\tconst tokens = [];\n\t\tlet t = this.nextToken();\n\t\twhile (t.type !== Token.EOF) {\n\t\t\ttokens.push(t);\n\t\t\tt = this.nextToken();\n\t\t}\n\t\treturn tokens;\n\t}\n\n\tnotifyListeners(e) {\n\t\tconst start = this._tokenStartCharIndex;\n\t\tconst stop = this._input.index;\n\t\tconst text = this._input.getText(start, stop);\n\t\tconst msg = \"token recognition error at: '\" + this.getErrorDisplay(text) + \"'\";\n\t\tconst listener = this.getErrorListenerDispatch();\n\t\tlistener.syntaxError(this, null, this._tokenStartLine,\n\t\t\t\tthis._tokenStartColumn, msg, e);\n\t}\n\n\tgetErrorDisplay(s) {\n\t\tconst d = [];\n\t\tfor (let i = 0; i < s.length; i++) {\n\t\t\td.push(s[i]);\n\t\t}\n\t\treturn d.join('');\n\t}\n\n\tgetErrorDisplayForChar(c) {\n\t\tif (c.charCodeAt(0) === Token.EOF) {\n\t\t\treturn \"<EOF>\";\n\t\t} else if (c === '\\n') {\n\t\t\treturn \"\\\\n\";\n\t\t} else if (c === '\\t') {\n\t\t\treturn \"\\\\t\";\n\t\t} else if (c === '\\r') {\n\t\t\treturn \"\\\\r\";\n\t\t} else {\n\t\t\treturn c;\n\t\t}\n\t}\n\n\tgetCharErrorDisplay(c) {\n\t\treturn \"'\" + this.getErrorDisplayForChar(c) + \"'\";\n\t}\n\n\t/**\n\t * Lexers can normally match any char in it's vocabulary after matching\n\t * a token, so do the easy thing and just kill a character and hope\n\t * it all works out. You can instead use the rule invocation stack\n\t * to do sophisticated error recovery if you are in a fragment rule.\n\t */\n\trecover(re) {\n\t\tif (this._input.LA(1) !== Token.EOF) {\n\t\t\tif (re instanceof LexerNoViableAltException) {\n\t\t\t\t// skip a char and try again\n\t\t\t\tthis._interp.consume(this._input);\n\t\t\t} else {\n\t\t\t\t// TODO: Do we lose character or line position information?\n\t\t\t\tthis._input.consume();\n\t\t\t}\n\t\t}\n\t}\n\n\tget inputStream(){\n\t\treturn this._input;\n\t}\n\n\tset inputStream(input) {\n\t\tthis._input = null;\n\t\tthis._tokenFactorySourcePair = [ this, this._input ];\n\t\tthis.reset();\n\t\tthis._input = input;\n\t\tthis._tokenFactorySourcePair = [ this, this._input ];\n\t}\n\n\tget sourceName(){\n\t\treturn this._input.sourceName;\n\t}\n\n\tget type(){\n\t\treturn this._type;\n\t}\n\n\tset type(type) {\n\t\tthis._type = type;\n\t}\n\n\tget line(){\n\t\treturn this._interp.line;\n\t}\n\n\tset line(line) {\n\t\tthis._interp.line = line;\n\t}\n\n\tget column(){\n\t\treturn this._interp.column;\n\t}\n\n\tset column(column) {\n\t\tthis._interp.column = column;\n\t}\n\n\tget text(){\n\t\tif (this._text !== null) {\n\t\t\treturn this._text;\n\t\t} else {\n\t\t\treturn this._interp.getText(this._input);\n\t\t}\n\t}\n\n\tset text(text) {\n\t\tthis._text = text;\n\t}\n}\n\n\n\n\nLexer.DEFAULT_MODE = 0;\nLexer.MORE = -2;\nLexer.SKIP = -3;\n\nLexer.DEFAULT_TOKEN_CHANNEL = Token.DEFAULT_CHANNEL;\nLexer.HIDDEN = Token.HIDDEN_CHANNEL;\nLexer.MIN_CHAR_VALUE = 0x0000;\nLexer.MAX_CHAR_VALUE = 0x10FFFF;\n\n","/* Copyright (c) 2012-2022 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause license that\n * can be found in the LICENSE.txt file in the project root.\n */\n\nimport ATN from './ATN.js';\nimport SemanticContext from './SemanticContext.js';\nimport { merge } from '../context/PredictionContextUtils.js';\nimport arrayToString from \"../utils/arrayToString.js\";\nimport HashSet from \"../misc/HashSet.js\";\nimport equalArrays from \"../utils/equalArrays.js\";\nimport HashCode from \"../misc/HashCode.js\";\n\nfunction hashATNConfig(c) {\n\treturn c.hashCodeForConfigSet();\n}\n\nfunction equalATNConfigs(a, b) {\n\tif ( a===b ) {\n\t\treturn true;\n\t} else if ( a===null || b===null ) {\n\t\treturn false;\n\t} else\n       return a.equalsForConfigSet(b);\n }\n\n/**\n * Specialized {@link Set}{@code <}{@link ATNConfig}{@code >} that can track\n * info about the set, with support for combining similar configurations using a\n * graph-structured stack\n */\nexport default class ATNConfigSet {\n\tconstructor(fullCtx) {\n\t\t/**\n\t\t * The reason that we need this is because we don't want the hash map to use\n\t\t * the standard hash code and equals. We need all configurations with the\n\t\t * same\n\t\t * {@code (s,i,_,semctx)} to be equal. Unfortunately, this key effectively\n\t\t * doubles\n\t\t * the number of objects associated with ATNConfigs. The other solution is\n\t\t * to\n\t\t * use a hash table that lets us specify the equals/hashcode operation.\n\t\t * All configs but hashed by (s, i, _, pi) not including context. Wiped out\n\t\t * when we go readonly as this set becomes a DFA state\n\t\t */\n\t\tthis.configLookup = new HashSet(hashATNConfig, equalATNConfigs);\n\t\t/**\n\t\t * Indicates that this configuration set is part of a full context\n\t\t * LL prediction. It will be used to determine how to merge $. With SLL\n\t\t * it's a wildcard whereas it is not for LL context merge\n\t\t */\n\t\tthis.fullCtx = fullCtx === undefined ? true : fullCtx;\n\t\t/**\n\t\t * Indicates that the set of configurations is read-only. Do not\n\t\t * allow any code to manipulate the set; DFA states will point at\n\t\t * the sets and they must not change. This does not protect the other\n\t\t * fields; in particular, conflictingAlts is set after\n\t\t * we've made this readonly\n\t\t */\n\t\tthis.readOnly = false;\n\t\t// Track the elements as they are added to the set; supports get(i)///\n\t\tthis.configs = [];\n\n\t\t// TODO: these fields make me pretty uncomfortable but nice to pack up info\n\t\t// together, saves recomputation\n\t\t// TODO: can we track conflicts as they are added to save scanning configs\n\t\t// later?\n\t\tthis.uniqueAlt = 0;\n\t\tthis.conflictingAlts = null;\n\n\t\t/**\n\t\t * Used in parser and lexer. In lexer, it indicates we hit a pred\n\t\t * while computing a closure operation. Don't make a DFA state from this\n\t\t */\n\t\tthis.hasSemanticContext = false;\n\t\tthis.dipsIntoOuterContext = false;\n\n\t\tthis.cachedHashCode = -1;\n\t}\n\n\t/**\n\t * Adding a new config means merging contexts with existing configs for\n\t * {@code (s, i, pi, _)}, where {@code s} is the\n\t * {@link ATNConfig//state}, {@code i} is the {@link ATNConfig//alt}, and\n\t * {@code pi} is the {@link ATNConfig//semanticContext}. We use\n\t * {@code (s,i,pi)} as key.\n\t *\n\t * <p>This method updates {@link //dipsIntoOuterContext} and\n\t * {@link //hasSemanticContext} when necessary.</p>\n\t */\n\tadd(config, mergeCache) {\n\t\tif (mergeCache === undefined) {\n\t\t\tmergeCache = null;\n\t\t}\n\t\tif (this.readOnly) {\n\t\t\tthrow \"This set is readonly\";\n\t\t}\n\t\tif (config.semanticContext !== SemanticContext.NONE) {\n\t\t\tthis.hasSemanticContext = true;\n\t\t}\n\t\tif (config.reachesIntoOuterContext > 0) {\n\t\t\tthis.dipsIntoOuterContext = true;\n\t\t}\n\t\tconst existing = this.configLookup.add(config);\n\t\tif (existing === config) {\n\t\t\tthis.cachedHashCode = -1;\n\t\t\tthis.configs.push(config); // track order here\n\t\t\treturn true;\n\t\t}\n\t\t// a previous (s,i,pi,_), merge with it and save result\n\t\tconst rootIsWildcard = !this.fullCtx;\n\t\tconst merged = merge(existing.context, config.context, rootIsWildcard, mergeCache);\n\t\t/**\n\t\t * no need to check for existing.context, config.context in cache\n\t\t * since only way to create new graphs is \"call rule\" and here. We\n\t\t * cache at both places\n\t\t */\n\t\texisting.reachesIntoOuterContext = Math.max( existing.reachesIntoOuterContext, config.reachesIntoOuterContext);\n\t\t// make sure to preserve the precedence filter suppression during the merge\n\t\tif (config.precedenceFilterSuppressed) {\n\t\t\texisting.precedenceFilterSuppressed = true;\n\t\t}\n\t\texisting.context = merged; // replace context; no need to alt mapping\n\t\treturn true;\n\t}\n\n\tgetStates() {\n\t\tconst states = new HashSet();\n\t\tfor (let i = 0; i < this.configs.length; i++) {\n\t\t\tstates.add(this.configs[i].state);\n\t\t}\n\t\treturn states;\n\t}\n\n\tgetPredicates() {\n\t\tconst preds = [];\n\t\tfor (let i = 0; i < this.configs.length; i++) {\n\t\t\tconst c = this.configs[i].semanticContext;\n\t\t\tif (c !== SemanticContext.NONE) {\n\t\t\t\tpreds.push(c.semanticContext);\n\t\t\t}\n\t\t}\n\t\treturn preds;\n\t}\n\n\toptimizeConfigs(interpreter) {\n\t\tif (this.readOnly) {\n\t\t\tthrow \"This set is readonly\";\n\t\t}\n\t\tif (this.configLookup.length === 0) {\n\t\t\treturn;\n\t\t}\n\t\tfor (let i = 0; i < this.configs.length; i++) {\n\t\t\tconst config = this.configs[i];\n\t\t\tconfig.context = interpreter.getCachedContext(config.context);\n\t\t}\n\t}\n\n\taddAll(coll) {\n\t\tfor (let i = 0; i < coll.length; i++) {\n\t\t\tthis.add(coll[i]);\n\t\t}\n\t\treturn false;\n\t}\n\n\tequals(other) {\n\t\treturn this === other ||\n\t\t\t(other instanceof ATNConfigSet &&\n\t\t\tequalArrays(this.configs, other.configs) &&\n\t\t\tthis.fullCtx === other.fullCtx &&\n\t\t\tthis.uniqueAlt === other.uniqueAlt &&\n\t\t\tthis.conflictingAlts === other.conflictingAlts &&\n\t\t\tthis.hasSemanticContext === other.hasSemanticContext &&\n\t\t\tthis.dipsIntoOuterContext === other.dipsIntoOuterContext);\n\t}\n\n\thashCode() {\n\t\tconst hash = new HashCode();\n\t\thash.update(this.configs);\n\t\treturn hash.finish();\n\t}\n\n\tupdateHashCode(hash) {\n\t\tif (this.readOnly) {\n\t\t\tif (this.cachedHashCode === -1) {\n\t\t\t\tthis.cachedHashCode = this.hashCode();\n\t\t\t}\n\t\t\thash.update(this.cachedHashCode);\n\t\t} else {\n\t\t\thash.update(this.hashCode());\n\t\t}\n\t}\n\n\tisEmpty() {\n\t\treturn this.configs.length === 0;\n\t}\n\n\tcontains(item) {\n\t\tif (this.configLookup === null) {\n\t\t\tthrow \"This method is not implemented for readonly sets.\";\n\t\t}\n\t\treturn this.configLookup.contains(item);\n\t}\n\n\tcontainsFast(item) {\n\t\tif (this.configLookup === null) {\n\t\t\tthrow \"This method is not implemented for readonly sets.\";\n\t\t}\n\t\treturn this.configLookup.containsFast(item);\n\t}\n\n\tclear() {\n\t\tif (this.readOnly) {\n\t\t\tthrow \"This set is readonly\";\n\t\t}\n\t\tthis.configs = [];\n\t\tthis.cachedHashCode = -1;\n\t\tthis.configLookup = new HashSet();\n\t}\n\n\tsetReadonly(readOnly) {\n\t\tthis.readOnly = readOnly;\n\t\tif (readOnly) {\n\t\t\tthis.configLookup = null; // can't mod, no need for lookup cache\n\t\t}\n\t}\n\n\ttoString() {\n\t\treturn arrayToString(this.configs) +\n\t\t\t(this.hasSemanticContext ? \",hasSemanticContext=\" + this.hasSemanticContext : \"\") +\n\t\t\t(this.uniqueAlt !== ATN.INVALID_ALT_NUMBER ? \",uniqueAlt=\" + this.uniqueAlt : \"\") +\n\t\t\t(this.conflictingAlts !== null ? \",conflictingAlts=\" + this.conflictingAlts : \"\") +\n\t\t\t(this.dipsIntoOuterContext ? \",dipsIntoOuterContext\" : \"\");\n\t}\n\n\tget items(){\n\t\treturn this.configs;\n\t}\n\n\tget length(){\n\t\treturn this.configs.length;\n\t}\n}\n\n","/* Copyright (c) 2012-2022 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause license that\n * can be found in the LICENSE.txt file in the project root.\n */\n\nimport ATNConfigSet from '../atn/ATNConfigSet.js';\nimport HashCode from \"../misc/HashCode.js\";\nimport HashSet from \"../misc/HashSet.js\";\n\n\n/**\n * A DFA state represents a set of possible ATN configurations.\n * As Aho, Sethi, Ullman p. 117 says \"The DFA uses its state\n * to keep track of all possible states the ATN can be in after\n * reading each input symbol. That is to say, after reading\n * input a1a2..an, the DFA is in a state that represents the\n * subset T of the states of the ATN that are reachable from the\n * ATN's start state along some path labeled a1a2..an.\"\n * In conventional NFA&rarr;DFA conversion, therefore, the subset T\n * would be a bitset representing the set of states the\n * ATN could be in. We need to track the alt predicted by each\n * state as well, however. More importantly, we need to maintain\n * a stack of states, tracking the closure operations as they\n * jump from rule to rule, emulating rule invocations (method calls).\n * I have to add a stack to simulate the proper lookahead sequences for\n * the underlying LL grammar from which the ATN was derived.\n *\n * <p>I use a set of ATNConfig objects not simple states. An ATNConfig\n * is both a state (ala normal conversion) and a RuleContext describing\n * the chain of rules (if any) followed to arrive at that state.</p>\n *\n * <p>A DFA state may have multiple references to a particular state,\n * but with different ATN contexts (with same or different alts)\n * meaning that state was reached via a different set of rule invocations.</p>\n */\nexport default class DFAState {\n\tconstructor(stateNumber, configs) {\n\t\tif (stateNumber === null) {\n\t\t\tstateNumber = -1;\n\t\t}\n\t\tif (configs === null) {\n\t\t\tconfigs = new ATNConfigSet();\n\t\t}\n\t\tthis.stateNumber = stateNumber;\n\t\tthis.configs = configs;\n\t\t/**\n\t\t * {@code edges[symbol]} points to target of symbol. Shift up by 1 so (-1)\n\t\t * {@link Token//EOF} maps to {@code edges[0]}.\n\t\t */\n\t\tthis.edges = null;\n\t\tthis.isAcceptState = false;\n\t\t/**\n\t\t * if accept state, what ttype do we match or alt do we predict?\n\t\t * This is set to {@link ATN//INVALID_ALT_NUMBER} when {@link//predicates}\n\t\t * {@code !=null} or {@link //requiresFullContext}.\n\t\t */\n\t\tthis.prediction = 0;\n\t\tthis.lexerActionExecutor = null;\n\t\t/**\n\t\t * Indicates that this state was created during SLL prediction that\n\t\t * discovered a conflict between the configurations in the state. Future\n\t\t * {@link ParserATNSimulator//execATN} invocations immediately jumped doing\n\t\t * full context prediction if this field is true.\n\t\t */\n\t\tthis.requiresFullContext = false;\n\t\t/**\n\t\t * During SLL parsing, this is a list of predicates associated with the\n\t\t * ATN configurations of the DFA state. When we have predicates,\n\t\t * {@link //requiresFullContext} is {@code false} since full context\n\t\t * prediction evaluates predicates\n\t\t * on-the-fly. If this is not null, then {@link //prediction} is\n\t\t * {@link ATN//INVALID_ALT_NUMBER}.\n\t\t *\n\t\t * <p>We only use these for non-{@link //requiresFullContext} but\n\t\t * conflicting states. That\n\t\t * means we know from the context (it's $ or we don't dip into outer\n\t\t * context) that it's an ambiguity not a conflict.</p>\n\t\t *\n\t\t * <p>This list is computed by {@link\n\t\t * ParserATNSimulator//predicateDFAState}.</p>\n\t\t */\n\t\tthis.predicates = null;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Get the set of all alts mentioned by all ATN configurations in this\n\t * DFA state.\n\t */\n\tgetAltSet() {\n\t\tconst alts = new HashSet();\n\t\tif (this.configs !== null) {\n\t\t\tfor (let i = 0; i < this.configs.length; i++) {\n\t\t\t\tconst c = this.configs[i];\n\t\t\t\talts.add(c.alt);\n\t\t\t}\n\t\t}\n\t\tif (alts.length === 0) {\n\t\t\treturn null;\n\t\t} else {\n\t\t\treturn alts;\n\t\t}\n\t}\n\n\t/**\n\t * Two {@link DFAState} instances are equal if their ATN configuration sets\n\t * are the same. This method is used to see if a state already exists.\n\t *\n\t * <p>Because the number of alternatives and number of ATN configurations are\n\t * finite, there is a finite number of DFA states that can be processed.\n\t * This is necessary to show that the algorithm terminates.</p>\n\t *\n\t * <p>Cannot test the DFA state numbers here because in\n\t * {@link ParserATNSimulator//addDFAState} we need to know if any other state\n\t * exists that has this exact set of ATN configurations. The\n\t * {@link //stateNumber} is irrelevant.</p>\n\t */\n\tequals(other) {\n\t\t// compare set of ATN configurations in this set with other\n\t\treturn this === other ||\n\t\t\t\t(other instanceof DFAState &&\n\t\t\t\t\tthis.configs.equals(other.configs));\n\t}\n\n\ttoString() {\n\t\tlet s = \"\" + this.stateNumber + \":\" + this.configs;\n\t\tif(this.isAcceptState) {\n\t\t\ts = s + \"=>\";\n\t\t\tif (this.predicates !== null)\n\t\t\t\ts = s + this.predicates;\n\t\t\telse\n\t\t\t\ts = s + this.prediction;\n\t\t}\n\t\treturn s;\n\t}\n\n\thashCode() {\n\t\tconst hash = new HashCode();\n\t\thash.update(this.configs);\n\t\treturn hash.finish();\n\t}\n}\n","/* Copyright (c) 2012-2022 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause license that\n * can be found in the LICENSE.txt file in the project root.\n */\n\nimport DFAState from '../dfa/DFAState.js';\nimport ATNConfigSet from './ATNConfigSet.js';\nimport { getCachedPredictionContext } from '../context/PredictionContextUtils.js';\nimport HashMap from \"../misc/HashMap.js\";\n\nexport default class ATNSimulator {\n    constructor(atn, sharedContextCache) {\n        /**\n         * The context cache maps all PredictionContext objects that are ==\n         * to a single cached copy. This cache is shared across all contexts\n         * in all ATNConfigs in all DFA states.  We rebuild each ATNConfigSet\n         * to use only cached nodes/graphs in addDFAState(). We don't want to\n         * fill this during closure() since there are lots of contexts that\n         * pop up but are not used ever again. It also greatly slows down closure().\n         *\n         * <p>This cache makes a huge difference in memory and a little bit in speed.\n         * For the Java grammar on java.*, it dropped the memory requirements\n         * at the end from 25M to 16M. We don't store any of the full context\n         * graphs in the DFA because they are limited to local context only,\n         * but apparently there's a lot of repetition there as well. We optimize\n         * the config contexts before storing the config set in the DFA states\n         * by literally rebuilding them with cached subgraphs only.</p>\n         *\n         * <p>I tried a cache for use during closure operations, that was\n         * whacked after each adaptivePredict(). It cost a little bit\n         * more time I think and doesn't save on the overall footprint\n         * so it's not worth the complexity.</p>\n         */\n        this.atn = atn;\n        this.sharedContextCache = sharedContextCache;\n        return this;\n    }\n\n    getCachedContext(context) {\n        if (this.sharedContextCache ===null) {\n            return context;\n        }\n        const visited = new HashMap();\n        return getCachedPredictionContext(context, this.sharedContextCache, visited);\n    }\n}\n\n// Must distinguish between missing edge and edge we know leads nowhere///\nATNSimulator.ERROR = new DFAState(0x7FFFFFFF, new ATNConfigSet());\n\n","/* Copyright (c) 2012-2022 The ANTLR Project Contributors. All rights reserved.\n * Use is of this file is governed by the BSD 3-clause license that\n * can be found in the LICENSE.txt file in the project root.\n */\nimport ATNConfigSet from \"./ATNConfigSet.js\";\nimport HashSet from \"../misc/HashSet.js\";\n\nexport default class OrderedATNConfigSet extends ATNConfigSet {\n    constructor() {\n        super();\n        this.configLookup = new HashSet();\n    }\n}\n","/* Copyright (c) 2012-2022 The ANTLR Project Contributors. All rights reserved.\n * Use is of this file is governed by the BSD 3-clause license that\n * can be found in the LICENSE.txt file in the project root.\n */\nimport DecisionState from \"../state/DecisionState.js\";\nimport ATNConfig from \"./ATNConfig.js\";\n\nexport default class LexerATNConfig extends ATNConfig {\n    constructor(params, config) {\n        super(params, config);\n\n        // This is the backing field for {@link //getLexerActionExecutor}.\n        const lexerActionExecutor = params.lexerActionExecutor || null;\n        this.lexerActionExecutor = lexerActionExecutor || (config!==null ? config.lexerActionExecutor : null);\n        this.passedThroughNonGreedyDecision = config!==null ? this.checkNonGreedyDecision(config, this.state) : false;\n        this.hashCodeForConfigSet = LexerATNConfig.prototype.hashCode;\n        this.equalsForConfigSet = LexerATNConfig.prototype.equals;\n        return this;\n    }\n\n    updateHashCode(hash) {\n        hash.update(this.state.stateNumber, this.alt, this.context, this.semanticContext, this.passedThroughNonGreedyDecision, this.lexerActionExecutor);\n    }\n\n    equals(other) {\n        return this === other ||\n            (other instanceof LexerATNConfig &&\n                this.passedThroughNonGreedyDecision === other.passedThroughNonGreedyDecision &&\n                (this.lexerActionExecutor ? this.lexerActionExecutor.equals(other.lexerActionExecutor) : !other.lexerActionExecutor) &&\n                super.equals(other));\n    }\n\n    checkNonGreedyDecision(source, target) {\n        return source.passedThroughNonGreedyDecision ||\n            (target instanceof DecisionState) && target.nonGreedy;\n    }\n}\n\n","/* Copyright (c) 2012-2022 The ANTLR Project Contributors. All rights reserved.\n * Use is of this file is governed by the BSD 3-clause license that\n * can be found in the LICENSE.txt file in the project root.\n */\n/**\n * This implementation of {@link LexerAction} is used for tracking input offsets\n * for position-dependent actions within a {@link LexerActionExecutor}.\n *\n * <p>This action is not serialized as part of the ATN, and is only required for\n * position-dependent lexer actions which appear at a location other than the\n * end of a rule. For more information about DFA optimizations employed for\n * lexer actions, see {@link LexerActionExecutor//append} and\n * {@link LexerActionExecutor//fixOffsetBeforeMatch}.</p>\n *\n * Constructs a new indexed custom action by associating a character offset\n * with a {@link LexerAction}.\n *\n * <p>Note: This class is only required for lexer actions for which\n * {@link LexerAction//isPositionDependent} returns {@code true}.</p>\n *\n * @param offset The offset into the input {@link CharStream}, relative to\n * the token start index, at which the specified lexer action should be\n * executed.\n * @param action The lexer action to execute at a particular offset in the\n * input {@link CharStream}.\n */\nimport LexerAction from \"./LexerAction.js\";\n\n\nexport default class LexerIndexedCustomAction extends LexerAction {\n    constructor(offset, action) {\n        super(action.actionType);\n        this.offset = offset;\n        this.action = action;\n        this.isPositionDependent = true;\n    }\n\n    /**\n     * <p>This method calls {@link //execute} on the result of {@link //getAction}\n     * using the provided {@code lexer}.</p>\n     */\n    execute(lexer) {\n        // assume the input stream position was properly set by the calling code\n        this.action.execute(lexer);\n    }\n\n    updateHashCode(hash) {\n        hash.update(this.actionType, this.offset, this.action);\n    }\n\n    equals(other) {\n        if (this === other) {\n            return true;\n        } else if (! (other instanceof LexerIndexedCustomAction)) {\n            return false;\n        } else {\n            return this.offset === other.offset && this.action === other.action;\n        }\n    }\n}\n","/* Copyright (c) 2012-2022 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause license that\n * can be found in the LICENSE.txt file in the project root.\n */\n\nimport LexerIndexedCustomAction from '../action/LexerIndexedCustomAction.js';\nimport HashCode from \"../misc/HashCode.js\";\n\nexport default class LexerActionExecutor {\n\t/**\n\t * Represents an executor for a sequence of lexer actions which traversed during\n\t * the matching operation of a lexer rule (token).\n\t *\n\t * <p>The executor tracks position information for position-dependent lexer actions\n\t * efficiently, ensuring that actions appearing only at the end of the rule do\n\t * not cause bloating of the {@link DFA} created for the lexer.</p>\n\t */\n\tconstructor(lexerActions) {\n\t\tthis.lexerActions = lexerActions === null ? [] : lexerActions;\n\t\t/**\n\t\t * Caches the result of {@link //hashCode} since the hash code is an element\n\t\t * of the performance-critical {@link LexerATNConfig//hashCode} operation\n\t\t */\n\t\tthis.cachedHashCode = HashCode.hashStuff(lexerActions); // \"\".join([str(la) for la in\n\t\t// lexerActions]))\n\t\treturn this;\n\t}\n\n\t/**\n\t * Creates a {@link LexerActionExecutor} which encodes the current offset\n\t * for position-dependent lexer actions.\n\t *\n\t * <p>Normally, when the executor encounters lexer actions where\n\t * {@link LexerAction//isPositionDependent} returns {@code true}, it calls\n\t * {@link IntStream//seek} on the input {@link CharStream} to set the input\n\t * position to the <em>end</em> of the current token. This behavior provides\n\t * for efficient DFA representation of lexer actions which appear at the end\n\t * of a lexer rule, even when the lexer rule matches a variable number of\n\t * characters.</p>\n\t *\n\t * <p>Prior to traversing a match transition in the ATN, the current offset\n\t * from the token start index is assigned to all position-dependent lexer\n\t * actions which have not already been assigned a fixed offset. By storing\n\t * the offsets relative to the token start index, the DFA representation of\n\t * lexer actions which appear in the middle of tokens remains efficient due\n\t * to sharing among tokens of the same length, regardless of their absolute\n\t * position in the input stream.</p>\n\t *\n\t * <p>If the current executor already has offsets assigned to all\n\t * position-dependent lexer actions, the method returns {@code this}.</p>\n\t *\n\t * @param offset The current offset to assign to all position-dependent\n\t * lexer actions which do not already have offsets assigned.\n\t *\n\t * @return {LexerActionExecutor} A {@link LexerActionExecutor} which stores input stream offsets\n\t * for all position-dependent lexer actions.\n\t */\n\tfixOffsetBeforeMatch(offset) {\n\t\tlet updatedLexerActions = null;\n\t\tfor (let i = 0; i < this.lexerActions.length; i++) {\n\t\t\tif (this.lexerActions[i].isPositionDependent &&\n\t\t\t\t\t!(this.lexerActions[i] instanceof LexerIndexedCustomAction)) {\n\t\t\t\tif (updatedLexerActions === null) {\n\t\t\t\t\tupdatedLexerActions = this.lexerActions.concat([]);\n\t\t\t\t}\n\t\t\t\tupdatedLexerActions[i] = new LexerIndexedCustomAction(offset,\n\t\t\t\t\t\tthis.lexerActions[i]);\n\t\t\t}\n\t\t}\n\t\tif (updatedLexerActions === null) {\n\t\t\treturn this;\n\t\t} else {\n\t\t\treturn new LexerActionExecutor(updatedLexerActions);\n\t\t}\n\t}\n\n\t/**\n\t * Execute the actions encapsulated by this executor within the context of a\n\t * particular {@link Lexer}.\n\t *\n\t * <p>This method calls {@link IntStream//seek} to set the position of the\n\t * {@code input} {@link CharStream} prior to calling\n\t * {@link LexerAction//execute} on a position-dependent action. Before the\n\t * method returns, the input position will be restored to the same position\n\t * it was in when the method was invoked.</p>\n\t *\n\t * @param lexer The lexer instance.\n\t * @param input The input stream which is the source for the current token.\n\t * When this method is called, the current {@link IntStream//index} for\n\t * {@code input} should be the start of the following token, i.e. 1\n\t * character past the end of the current token.\n\t * @param startIndex The token start index. This value may be passed to\n\t * {@link IntStream//seek} to set the {@code input} position to the beginning\n\t * of the token.\n\t */\n\texecute(lexer, input, startIndex) {\n\t\tlet requiresSeek = false;\n\t\tconst stopIndex = input.index;\n\t\ttry {\n\t\t\tfor (let i = 0; i < this.lexerActions.length; i++) {\n\t\t\t\tlet lexerAction = this.lexerActions[i];\n\t\t\t\tif (lexerAction instanceof LexerIndexedCustomAction) {\n\t\t\t\t\tconst offset = lexerAction.offset;\n\t\t\t\t\tinput.seek(startIndex + offset);\n\t\t\t\t\tlexerAction = lexerAction.action;\n\t\t\t\t\trequiresSeek = (startIndex + offset) !== stopIndex;\n\t\t\t\t} else if (lexerAction.isPositionDependent) {\n\t\t\t\t\tinput.seek(stopIndex);\n\t\t\t\t\trequiresSeek = false;\n\t\t\t\t}\n\t\t\t\tlexerAction.execute(lexer);\n\t\t\t}\n\t\t} finally {\n\t\t\tif (requiresSeek) {\n\t\t\t\tinput.seek(stopIndex);\n\t\t\t}\n\t\t}\n\t}\n\n\thashCode() {\n\t\treturn this.cachedHashCode;\n\t}\n\n\tupdateHashCode(hash) {\n\t\thash.update(this.cachedHashCode);\n\t}\n\n\tequals(other) {\n\t\tif (this === other) {\n\t\t\treturn true;\n\t\t} else if (!(other instanceof LexerActionExecutor)) {\n\t\t\treturn false;\n\t\t} else if (this.cachedHashCode != other.cachedHashCode) {\n\t\t\treturn false;\n\t\t} else if (this.lexerActions.length != other.lexerActions.length) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\tconst numActions = this.lexerActions.length\n\t\t\tfor (let idx = 0; idx < numActions; ++idx) {\n\t\t\t\tif (!this.lexerActions[idx].equals(other.lexerActions[idx])) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t}\n\n\t/**\n\t * Creates a {@link LexerActionExecutor} which executes the actions for\n\t * the input {@code lexerActionExecutor} followed by a specified\n\t * {@code lexerAction}.\n\t *\n\t * @param lexerActionExecutor The executor for actions already traversed by\n\t * the lexer while matching a token within a particular\n\t * {@link LexerATNConfig}. If this is {@code null}, the method behaves as\n\t * though it were an empty executor.\n\t * @param lexerAction The lexer action to execute after the actions\n\t * specified in {@code lexerActionExecutor}.\n\t *\n\t * @return {LexerActionExecutor} A {@link LexerActionExecutor} for executing the combine actions\n\t * of {@code lexerActionExecutor} and {@code lexerAction}.\n\t */\n\tstatic append(lexerActionExecutor, lexerAction) {\n\t\tif (lexerActionExecutor === null) {\n\t\t\treturn new LexerActionExecutor([ lexerAction ]);\n\t\t}\n\t\tconst lexerActions = lexerActionExecutor.lexerActions.concat([ lexerAction ]);\n\t\treturn new LexerActionExecutor(lexerActions);\n\t}\n}\n","/* Copyright (c) 2012-2022 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause license that\n * can be found in the LICENSE.txt file in the project root.\n */\n\nimport Token from '../Token.js';\nimport Lexer from './../Lexer.js';\nimport ATN from './ATN.js';\nimport ATNSimulator from './ATNSimulator.js';\nimport DFAState from '../dfa/DFAState.js';\nimport OrderedATNConfigSet from './OrderedATNConfigSet.js';\nimport PredictionContext from '../context/PredictionContext.js';\nimport SingletonPredictionContext from '../context/SingletonPredictionContext.js';\nimport RuleStopState from '../state/RuleStopState.js';\nimport LexerATNConfig from './LexerATNConfig.js';\nimport Transition from '../transition/Transition.js';\nimport LexerActionExecutor from './LexerActionExecutor.js';\nimport LexerNoViableAltException from '../error/LexerNoViableAltException.js';\n\nfunction resetSimState(sim) {\n    sim.index = -1;\n    sim.line = 0;\n    sim.column = -1;\n    sim.dfaState = null;\n}\n\nclass SimState {\n    constructor() {\n        resetSimState(this);\n    }\n\n    reset() {\n        resetSimState(this);\n    }\n}\n\nexport default class LexerATNSimulator extends ATNSimulator {\n    /**\n     * When we hit an accept state in either the DFA or the ATN, we\n     * have to notify the character stream to start buffering characters\n     * via {@link IntStream//mark} and record the current state. The current sim state\n     * includes the current index into the input, the current line,\n     * and current character position in that line. Note that the Lexer is\n     * tracking the starting line and characterization of the token. These\n     * variables track the \"state\" of the simulator when it hits an accept state.\n     *\n     * <p>We track these variables separately for the DFA and ATN simulation\n     * because the DFA simulation often has to fail over to the ATN\n     * simulation. If the ATN simulation fails, we need the DFA to fall\n     * back to its previously accepted state, if any. If the ATN succeeds,\n     * then the ATN does the accept and the DFA simulator that invoked it\n     * can simply return the predicted token type.</p>\n     */\n    constructor(recog, atn, decisionToDFA, sharedContextCache) {\n        super(atn, sharedContextCache);\n        this.decisionToDFA = decisionToDFA;\n        this.recog = recog;\n        /**\n         * The current token's starting index into the character stream.\n         * Shared across DFA to ATN simulation in case the ATN fails and the\n         * DFA did not have a previous accept state. In this case, we use the\n         * ATN-generated exception object\n         */\n        this.startIndex = -1;\n        // line number 1..n within the input///\n        this.line = 1;\n        /**\n         * The index of the character relative to the beginning of the line\n         * 0..n-1\n         */\n        this.column = 0;\n        this.mode = Lexer.DEFAULT_MODE;\n        /**\n         * Used during DFA/ATN exec to record the most recent accept configuration\n         * info\n         */\n        this.prevAccept = new SimState();\n    }\n\n    copyState(simulator) {\n        this.column = simulator.column;\n        this.line = simulator.line;\n        this.mode = simulator.mode;\n        this.startIndex = simulator.startIndex;\n    }\n\n    match(input, mode) {\n        this.mode = mode;\n        const mark = input.mark();\n        try {\n            this.startIndex = input.index;\n            this.prevAccept.reset();\n            const dfa = this.decisionToDFA[mode];\n            if (dfa.s0 === null) {\n                return this.matchATN(input);\n            } else {\n                return this.execATN(input, dfa.s0);\n            }\n        } finally {\n            input.release(mark);\n        }\n    }\n\n    reset() {\n        this.prevAccept.reset();\n        this.startIndex = -1;\n        this.line = 1;\n        this.column = 0;\n        this.mode = Lexer.DEFAULT_MODE;\n    }\n\n    matchATN(input) {\n        const startState = this.atn.modeToStartState[this.mode];\n\n        if (LexerATNSimulator.debug) {\n            console.log(\"matchATN mode \" + this.mode + \" start: \" + startState);\n        }\n        const old_mode = this.mode;\n        const s0_closure = this.computeStartState(input, startState);\n        const suppressEdge = s0_closure.hasSemanticContext;\n        s0_closure.hasSemanticContext = false;\n\n        const next = this.addDFAState(s0_closure);\n        if (!suppressEdge) {\n            this.decisionToDFA[this.mode].s0 = next;\n        }\n\n        const predict = this.execATN(input, next);\n\n        if (LexerATNSimulator.debug) {\n            console.log(\"DFA after matchATN: \" + this.decisionToDFA[old_mode].toLexerString());\n        }\n        return predict;\n    }\n\n    execATN(input, ds0) {\n        if (LexerATNSimulator.debug) {\n            console.log(\"start state closure=\" + ds0.configs);\n        }\n        if (ds0.isAcceptState) {\n            // allow zero-length tokens\n            this.captureSimState(this.prevAccept, input, ds0);\n        }\n        let t = input.LA(1);\n        let s = ds0; // s is current/from DFA state\n\n        for (; ;) { // while more work\n            if (LexerATNSimulator.debug) {\n                console.log(\"execATN loop starting closure: \" + s.configs);\n            }\n\n            /**\n             * As we move src->trg, src->trg, we keep track of the previous trg to\n             * avoid looking up the DFA state again, which is expensive.\n             * If the previous target was already part of the DFA, we might\n             * be able to avoid doing a reach operation upon t. If s!=null,\n             * it means that semantic predicates didn't prevent us from\n             * creating a DFA state. Once we know s!=null, we check to see if\n             * the DFA state has an edge already for t. If so, we can just reuse\n             * it's configuration set; there's no point in re-computing it.\n             * This is kind of like doing DFA simulation within the ATN\n             * simulation because DFA simulation is really just a way to avoid\n             * computing reach/closure sets. Technically, once we know that\n             * we have a previously added DFA state, we could jump over to\n             * the DFA simulator. But, that would mean popping back and forth\n             * a lot and making things more complicated algorithmically.\n             * This optimization makes a lot of sense for loops within DFA.\n             * A character will take us back to an existing DFA state\n             * that already has lots of edges out of it. e.g., .* in comments.\n             * print(\"Target for:\" + str(s) + \" and:\" + str(t))\n             */\n            let target = this.getExistingTargetState(s, t);\n            // print(\"Existing:\" + str(target))\n            if (target === null) {\n                target = this.computeTargetState(input, s, t);\n                // print(\"Computed:\" + str(target))\n            }\n            if (target === ATNSimulator.ERROR) {\n                break;\n            }\n            // If this is a consumable input element, make sure to consume before\n            // capturing the accept state so the input index, line, and char\n            // position accurately reflect the state of the interpreter at the\n            // end of the token.\n            if (t !== Token.EOF) {\n                this.consume(input);\n            }\n            if (target.isAcceptState) {\n                this.captureSimState(this.prevAccept, input, target);\n                if (t === Token.EOF) {\n                    break;\n                }\n            }\n            t = input.LA(1);\n            s = target; // flip; current DFA target becomes new src/from state\n        }\n        return this.failOrAccept(this.prevAccept, input, s.configs, t);\n    }\n\n    /**\n     * Get an existing target state for an edge in the DFA. If the target state\n     * for the edge has not yet been computed or is otherwise not available,\n     * this method returns {@code null}.\n     *\n     * @param s The current DFA state\n     * @param t The next input symbol\n     * @return The existing target DFA state for the given input symbol\n     * {@code t}, or {@code null} if the target state for this edge is not\n     * already cached\n     */\n    getExistingTargetState(s, t) {\n        if (s.edges === null || t < LexerATNSimulator.MIN_DFA_EDGE || t > LexerATNSimulator.MAX_DFA_EDGE) {\n            return null;\n        }\n\n        let target = s.edges[t - LexerATNSimulator.MIN_DFA_EDGE];\n        if (target === undefined) {\n            target = null;\n        }\n        if (LexerATNSimulator.debug && target !== null) {\n            console.log(\"reuse state \" + s.stateNumber + \" edge to \" + target.stateNumber);\n        }\n        return target;\n    }\n\n    /**\n     * Compute a target state for an edge in the DFA, and attempt to add the\n     * computed state and corresponding edge to the DFA.\n     *\n     * @param input The input stream\n     * @param s The current DFA state\n     * @param t The next input symbol\n     *\n     * @return The computed target DFA state for the given input symbol\n     * {@code t}. If {@code t} does not lead to a valid DFA state, this method\n     * returns {@link //ERROR}.\n     */\n    computeTargetState(input, s, t) {\n        const reach = new OrderedATNConfigSet();\n        // if we don't find an existing DFA state\n        // Fill reach starting from closure, following t transitions\n        this.getReachableConfigSet(input, s.configs, reach, t);\n\n        if (reach.items.length === 0) { // we got nowhere on t from s\n            if (!reach.hasSemanticContext) {\n                // we got nowhere on t, don't throw out this knowledge; it'd\n                // cause a failover from DFA later.\n                this.addDFAEdge(s, t, ATNSimulator.ERROR);\n            }\n            // stop when we can't match any more char\n            return ATNSimulator.ERROR;\n        }\n        // Add an edge from s to target DFA found/created for reach\n        return this.addDFAEdge(s, t, null, reach);\n    }\n\n    failOrAccept(prevAccept, input, reach, t) {\n        if (this.prevAccept.dfaState !== null) {\n            const lexerActionExecutor = prevAccept.dfaState.lexerActionExecutor;\n            this.accept(input, lexerActionExecutor, this.startIndex,\n                prevAccept.index, prevAccept.line, prevAccept.column);\n            return prevAccept.dfaState.prediction;\n        } else {\n            // if no accept and EOF is first char, return EOF\n            if (t === Token.EOF && input.index === this.startIndex) {\n                return Token.EOF;\n            }\n            throw new LexerNoViableAltException(this.recog, input, this.startIndex, reach);\n        }\n    }\n\n    /**\n     * Given a starting configuration set, figure out all ATN configurations\n     * we can reach upon input {@code t}. Parameter {@code reach} is a return\n     * parameter.\n     */\n    getReachableConfigSet(input, closure, reach, t) {\n        // this is used to skip processing for configs which have a lower priority\n        // than a config that already reached an accept state for the same rule\n        let skipAlt = ATN.INVALID_ALT_NUMBER;\n        for (let i = 0; i < closure.items.length; i++) {\n            const cfg = closure.items[i];\n            const currentAltReachedAcceptState = (cfg.alt === skipAlt);\n            if (currentAltReachedAcceptState && cfg.passedThroughNonGreedyDecision) {\n                continue;\n            }\n            if (LexerATNSimulator.debug) {\n                console.log(\"testing %s at %s\\n\", this.getTokenName(t), cfg\n                    .toString(this.recog, true));\n            }\n            for (let j = 0; j < cfg.state.transitions.length; j++) {\n                const trans = cfg.state.transitions[j]; // for each transition\n                const target = this.getReachableTarget(trans, t);\n                if (target !== null) {\n                    let lexerActionExecutor = cfg.lexerActionExecutor;\n                    if (lexerActionExecutor !== null) {\n                        lexerActionExecutor = lexerActionExecutor.fixOffsetBeforeMatch(input.index - this.startIndex);\n                    }\n                    const treatEofAsEpsilon = (t === Token.EOF);\n                    const config = new LexerATNConfig({state: target, lexerActionExecutor: lexerActionExecutor}, cfg);\n                    if (this.closure(input, config, reach,\n                        currentAltReachedAcceptState, true, treatEofAsEpsilon)) {\n                        // any remaining configs for this alt have a lower priority\n                        // than the one that just reached an accept state.\n                        skipAlt = cfg.alt;\n                    }\n                }\n            }\n        }\n    }\n\n    accept(input, lexerActionExecutor, startIndex, index, line, charPos) {\n        if (LexerATNSimulator.debug) {\n            console.log(\"ACTION %s\\n\", lexerActionExecutor);\n        }\n        // seek to after last char in token\n        input.seek(index);\n        this.line = line;\n        this.column = charPos;\n        if (lexerActionExecutor !== null && this.recog !== null) {\n            lexerActionExecutor.execute(this.recog, input, startIndex);\n        }\n    }\n\n    getReachableTarget(trans, t) {\n        if (trans.matches(t, 0, Lexer.MAX_CHAR_VALUE)) {\n            return trans.target;\n        } else {\n            return null;\n        }\n    }\n\n    computeStartState(input, p) {\n        const initialContext = PredictionContext.EMPTY;\n        const configs = new OrderedATNConfigSet();\n        for (let i = 0; i < p.transitions.length; i++) {\n            const target = p.transitions[i].target;\n            const cfg = new LexerATNConfig({state: target, alt: i + 1, context: initialContext}, null);\n            this.closure(input, cfg, configs, false, false, false);\n        }\n        return configs;\n    }\n\n    /**\n     * Since the alternatives within any lexer decision are ordered by\n     * preference, this method stops pursuing the closure as soon as an accept\n     * state is reached. After the first accept state is reached by depth-first\n     * search from {@code config}, all other (potentially reachable) states for\n     * this rule would have a lower priority.\n     *\n     * @return {Boolean} {@code true} if an accept state is reached, otherwise\n     * {@code false}.\n     */\n    closure(input, config, configs,\n            currentAltReachedAcceptState, speculative, treatEofAsEpsilon) {\n        let cfg = null;\n        if (LexerATNSimulator.debug) {\n            console.log(\"closure(\" + config.toString(this.recog, true) + \")\");\n        }\n        if (config.state instanceof RuleStopState) {\n            if (LexerATNSimulator.debug) {\n                if (this.recog !== null) {\n                    console.log(\"closure at %s rule stop %s\\n\", this.recog.ruleNames[config.state.ruleIndex], config);\n                } else {\n                    console.log(\"closure at rule stop %s\\n\", config);\n                }\n            }\n            if (config.context === null || config.context.hasEmptyPath()) {\n                if (config.context === null || config.context.isEmpty()) {\n                    configs.add(config);\n                    return true;\n                } else {\n                    configs.add(new LexerATNConfig({state: config.state, context: PredictionContext.EMPTY}, config));\n                    currentAltReachedAcceptState = true;\n                }\n            }\n            if (config.context !== null && !config.context.isEmpty()) {\n                for (let i = 0; i < config.context.length; i++) {\n                    if (config.context.getReturnState(i) !== PredictionContext.EMPTY_RETURN_STATE) {\n                        const newContext = config.context.getParent(i); // \"pop\" return state\n                        const returnState = this.atn.states[config.context.getReturnState(i)];\n                        cfg = new LexerATNConfig({state: returnState, context: newContext}, config);\n                        currentAltReachedAcceptState = this.closure(input, cfg,\n                            configs, currentAltReachedAcceptState, speculative,\n                            treatEofAsEpsilon);\n                    }\n                }\n            }\n            return currentAltReachedAcceptState;\n        }\n        // optimization\n        if (!config.state.epsilonOnlyTransitions) {\n            if (!currentAltReachedAcceptState || !config.passedThroughNonGreedyDecision) {\n                configs.add(config);\n            }\n        }\n        for (let j = 0; j < config.state.transitions.length; j++) {\n            const trans = config.state.transitions[j];\n            cfg = this.getEpsilonTarget(input, config, trans, configs, speculative, treatEofAsEpsilon);\n            if (cfg !== null) {\n                currentAltReachedAcceptState = this.closure(input, cfg, configs,\n                    currentAltReachedAcceptState, speculative, treatEofAsEpsilon);\n            }\n        }\n        return currentAltReachedAcceptState;\n    }\n\n    // side-effect: can alter configs.hasSemanticContext\n    getEpsilonTarget(input, config, trans,\n                     configs, speculative, treatEofAsEpsilon) {\n        let cfg = null;\n        if (trans.serializationType === Transition.RULE) {\n            const newContext = SingletonPredictionContext.create(config.context, trans.followState.stateNumber);\n            cfg = new LexerATNConfig({state: trans.target, context: newContext}, config);\n        } else if (trans.serializationType === Transition.PRECEDENCE) {\n            throw \"Precedence predicates are not supported in lexers.\";\n        } else if (trans.serializationType === Transition.PREDICATE) {\n            // Track traversing semantic predicates. If we traverse,\n            // we cannot add a DFA state for this \"reach\" computation\n            // because the DFA would not test the predicate again in the\n            // future. Rather than creating collections of semantic predicates\n            // like v3 and testing them on prediction, v4 will test them on the\n            // fly all the time using the ATN not the DFA. This is slower but\n            // semantically it's not used that often. One of the key elements to\n            // this predicate mechanism is not adding DFA states that see\n            // predicates immediately afterwards in the ATN. For example,\n\n            // a : ID {p1}? | ID {p2}? ;\n\n            // should create the start state for rule 'a' (to save start state\n            // competition), but should not create target of ID state. The\n            // collection of ATN states the following ID references includes\n            // states reached by traversing predicates. Since this is when we\n            // test them, we cannot cash the DFA state target of ID.\n\n            if (LexerATNSimulator.debug) {\n                console.log(\"EVAL rule \" + trans.ruleIndex + \":\" + trans.predIndex);\n            }\n            configs.hasSemanticContext = true;\n            if (this.evaluatePredicate(input, trans.ruleIndex, trans.predIndex, speculative)) {\n                cfg = new LexerATNConfig({state: trans.target}, config);\n            }\n        } else if (trans.serializationType === Transition.ACTION) {\n            if (config.context === null || config.context.hasEmptyPath()) {\n                // execute actions anywhere in the start rule for a token.\n                //\n                // TODO: if the entry rule is invoked recursively, some\n                // actions may be executed during the recursive call. The\n                // problem can appear when hasEmptyPath() is true but\n                // isEmpty() is false. In this case, the config needs to be\n                // split into two contexts - one with just the empty path\n                // and another with everything but the empty path.\n                // Unfortunately, the current algorithm does not allow\n                // getEpsilonTarget to return two configurations, so\n                // additional modifications are needed before we can support\n                // the split operation.\n                const lexerActionExecutor = LexerActionExecutor.append(config.lexerActionExecutor,\n                    this.atn.lexerActions[trans.actionIndex]);\n                cfg = new LexerATNConfig({state: trans.target, lexerActionExecutor: lexerActionExecutor}, config);\n            } else {\n                // ignore actions in referenced rules\n                cfg = new LexerATNConfig({state: trans.target}, config);\n            }\n        } else if (trans.serializationType === Transition.EPSILON) {\n            cfg = new LexerATNConfig({state: trans.target}, config);\n        } else if (trans.serializationType === Transition.ATOM ||\n            trans.serializationType === Transition.RANGE ||\n            trans.serializationType === Transition.SET) {\n            if (treatEofAsEpsilon) {\n                if (trans.matches(Token.EOF, 0, Lexer.MAX_CHAR_VALUE)) {\n                    cfg = new LexerATNConfig({state: trans.target}, config);\n                }\n            }\n        }\n        return cfg;\n    }\n\n    /**\n     * Evaluate a predicate specified in the lexer.\n     *\n     * <p>If {@code speculative} is {@code true}, this method was called before\n     * {@link //consume} for the matched character. This method should call\n     * {@link //consume} before evaluating the predicate to ensure position\n     * sensitive values, including {@link Lexer//getText}, {@link Lexer//getLine},\n     * and {@link Lexer//getcolumn}, properly reflect the current\n     * lexer state. This method should restore {@code input} and the simulator\n     * to the original state before returning (i.e. undo the actions made by the\n     * call to {@link //consume}.</p>\n     *\n     * @param input The input stream.\n     * @param ruleIndex The rule containing the predicate.\n     * @param predIndex The index of the predicate within the rule.\n     * @param speculative {@code true} if the current index in {@code input} is\n     * one character before the predicate's location.\n     *\n     * @return {@code true} if the specified predicate evaluates to\n     * {@code true}.\n     */\n    evaluatePredicate(input, ruleIndex,\n                      predIndex, speculative) {\n        // assume true if no recognizer was provided\n        if (this.recog === null) {\n            return true;\n        }\n        if (!speculative) {\n            return this.recog.sempred(null, ruleIndex, predIndex);\n        }\n        const savedcolumn = this.column;\n        const savedLine = this.line;\n        const index = input.index;\n        const marker = input.mark();\n        try {\n            this.consume(input);\n            return this.recog.sempred(null, ruleIndex, predIndex);\n        } finally {\n            this.column = savedcolumn;\n            this.line = savedLine;\n            input.seek(index);\n            input.release(marker);\n        }\n    }\n\n    captureSimState(settings, input, dfaState) {\n        settings.index = input.index;\n        settings.line = this.line;\n        settings.column = this.column;\n        settings.dfaState = dfaState;\n    }\n\n    addDFAEdge(from_, tk, to, cfgs) {\n        if (to === undefined) {\n            to = null;\n        }\n        if (cfgs === undefined) {\n            cfgs = null;\n        }\n        if (to === null && cfgs !== null) {\n            // leading to this call, ATNConfigSet.hasSemanticContext is used as a\n            // marker indicating dynamic predicate evaluation makes this edge\n            // dependent on the specific input sequence, so the static edge in the\n            // DFA should be omitted. The target DFAState is still created since\n            // execATN has the ability to resynchronize with the DFA state cache\n            // following the predicate evaluation step.\n            //\n            // TJP notes: next time through the DFA, we see a pred again and eval.\n            // If that gets us to a previously created (but dangling) DFA\n            // state, we can continue in pure DFA mode from there.\n            // /\n            const suppressEdge = cfgs.hasSemanticContext;\n            cfgs.hasSemanticContext = false;\n\n            to = this.addDFAState(cfgs);\n\n            if (suppressEdge) {\n                return to;\n            }\n        }\n        // add the edge\n        if (tk < LexerATNSimulator.MIN_DFA_EDGE || tk > LexerATNSimulator.MAX_DFA_EDGE) {\n            // Only track edges within the DFA bounds\n            return to;\n        }\n        if (LexerATNSimulator.debug) {\n            console.log(\"EDGE \" + from_ + \" -> \" + to + \" upon \" + tk);\n        }\n        if (from_.edges === null) {\n            // make room for tokens 1..n and -1 masquerading as index 0\n            from_.edges = [];\n        }\n        from_.edges[tk - LexerATNSimulator.MIN_DFA_EDGE] = to; // connect\n\n        return to;\n    }\n\n    /**\n     * Add a new DFA state if there isn't one with this set of\n     * configurations already. This method also detects the first\n     * configuration containing an ATN rule stop state. Later, when\n     * traversing the DFA, we will know which rule to accept.\n     */\n    addDFAState(configs) {\n        const proposed = new DFAState(null, configs);\n        let firstConfigWithRuleStopState = null;\n        for (let i = 0; i < configs.items.length; i++) {\n            const cfg = configs.items[i];\n            if (cfg.state instanceof RuleStopState) {\n                firstConfigWithRuleStopState = cfg;\n                break;\n            }\n        }\n        if (firstConfigWithRuleStopState !== null) {\n            proposed.isAcceptState = true;\n            proposed.lexerActionExecutor = firstConfigWithRuleStopState.lexerActionExecutor;\n            proposed.prediction = this.atn.ruleToTokenType[firstConfigWithRuleStopState.state.ruleIndex];\n        }\n        const dfa = this.decisionToDFA[this.mode];\n        const existing = dfa.states.get(proposed);\n        if (existing !== null) {\n            return existing;\n        }\n        const newState = proposed;\n        newState.stateNumber = dfa.states.length;\n        configs.setReadonly(true);\n        newState.configs = configs;\n        dfa.states.add(newState);\n        return newState;\n    }\n\n    getDFA(mode) {\n        return this.decisionToDFA[mode];\n    }\n\n// Get the text matched so far for the current token.\n    getText(input) {\n        // index is first lookahead char, don't include.\n        return input.getText(this.startIndex, input.index - 1);\n    }\n\n    consume(input) {\n        const curChar = input.LA(1);\n        if (curChar === \"\\n\".charCodeAt(0)) {\n            this.line += 1;\n            this.column = 0;\n        } else {\n            this.column += 1;\n        }\n        input.consume();\n    }\n\n    getTokenName(tt) {\n        if (tt === -1) {\n            return \"EOF\";\n        } else {\n            return \"'\" + String.fromCharCode(tt) + \"'\";\n        }\n    }\n}\n\nLexerATNSimulator.debug = false;\nLexerATNSimulator.dfa_debug = false;\n\nLexerATNSimulator.MIN_DFA_EDGE = 0;\nLexerATNSimulator.MAX_DFA_EDGE = 127; // forces unicode to stay in ATN\n","/* Copyright (c) 2012-2022 The ANTLR Project Contributors. All rights reserved.\n * Use is of this file is governed by the BSD 3-clause license that\n * can be found in the LICENSE.txt file in the project root.\n */\n/**\n * Map a predicate to a predicted alternative.\n */\nexport default class PredPrediction {\n    constructor(pred, alt) {\n        this.alt = alt;\n        this.pred = pred;\n    }\n\n    toString() {\n        return \"(\" + this.pred + \", \" + this.alt + \")\";\n    }\n}\n","/* Copyright (c) 2012-2022 The ANTLR Project Contributors. All rights reserved.\n * Use is of this file is governed by the BSD 3-clause license that\n * can be found in the LICENSE.txt file in the project root.\n */\nexport default class AltDict {\n\n    constructor() {\n        this.data = {};\n    }\n\n    get(key) {\n        return this.data[\"k-\" + key] || null;\n    }\n\n    set(key, value) {\n        this.data[\"k-\" + key] = value;\n    }\n\n    values() {\n        return Object.keys(this.data).filter(key => key.startsWith(\"k-\")).map(key => this.data[key], this);\n    }\n}\n","/* Copyright (c) 2012-2022 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause license that\n * can be found in the LICENSE.txt file in the project root.\n */\n\nimport ATN from './ATN.js';\nimport RuleStopState from '../state/RuleStopState.js';\nimport ATNConfigSet from './ATNConfigSet.js';\nimport ATNConfig from './ATNConfig.js';\nimport SemanticContext from './SemanticContext.js';\nimport BitSet from \"../misc/BitSet.js\";\nimport AltDict from \"../misc/AltDict.js\";\nimport HashCode from \"../misc/HashCode.js\";\nimport HashMap from \"../misc/HashMap.js\";\n\n/**\n * This enumeration defines the prediction modes available in ANTLR 4 along with\n * utility methods for analyzing configuration sets for conflicts and/or\n * ambiguities.\n */\nconst PredictionMode = {\n    /**\n     * The SLL(*) prediction mode. This prediction mode ignores the current\n     * parser context when making predictions. This is the fastest prediction\n     * mode, and provides correct results for many grammars. This prediction\n     * mode is more powerful than the prediction mode provided by ANTLR 3, but\n     * may result in syntax errors for grammar and input combinations which are\n     * not SLL.\n     *\n     * <p>\n     * When using this prediction mode, the parser will either return a correct\n     * parse tree (i.e. the same parse tree that would be returned with the\n     * {@link //LL} prediction mode), or it will report a syntax error. If a\n     * syntax error is encountered when using the {@link //SLL} prediction mode,\n     * it may be due to either an actual syntax error in the input or indicate\n     * that the particular combination of grammar and input requires the more\n     * powerful {@link //LL} prediction abilities to complete successfully.</p>\n     *\n     * <p>\n     * This prediction mode does not provide any guarantees for prediction\n     * behavior for syntactically-incorrect inputs.</p>\n     */\n    SLL: 0,\n\n    /**\n     * The LL(*) prediction mode. This prediction mode allows the current parser\n     * context to be used for resolving SLL conflicts that occur during\n     * prediction. This is the fastest prediction mode that guarantees correct\n     * parse results for all combinations of grammars with syntactically correct\n     * inputs.\n     *\n     * <p>\n     * When using this prediction mode, the parser will make correct decisions\n     * for all syntactically-correct grammar and input combinations. However, in\n     * cases where the grammar is truly ambiguous this prediction mode might not\n     * report a precise answer for <em>exactly which</em> alternatives are\n     * ambiguous.</p>\n     *\n     * <p>\n     * This prediction mode does not provide any guarantees for prediction\n     * behavior for syntactically-incorrect inputs.</p>\n     */\n    LL: 1,\n\n    /**\n     *\n     * The LL(*) prediction mode with exact ambiguity detection. In addition to\n     * the correctness guarantees provided by the {@link //LL} prediction mode,\n     * this prediction mode instructs the prediction algorithm to determine the\n     * complete and exact set of ambiguous alternatives for every ambiguous\n     * decision encountered while parsing.\n     *\n     * <p>\n     * This prediction mode may be used for diagnosing ambiguities during\n     * grammar development. Due to the performance overhead of calculating sets\n     * of ambiguous alternatives, this prediction mode should be avoided when\n     * the exact results are not necessary.</p>\n     *\n     * <p>\n     * This prediction mode does not provide any guarantees for prediction\n     * behavior for syntactically-incorrect inputs.</p>\n     */\n    LL_EXACT_AMBIG_DETECTION: 2,\n\n    /**\n     *\n     * Computes the SLL prediction termination condition.\n     *\n     * <p>\n     * This method computes the SLL prediction termination condition for both of\n     * the following cases.</p>\n     *\n     * <ul>\n     * <li>The usual SLL+LL fallback upon SLL conflict</li>\n     * <li>Pure SLL without LL fallback</li>\n     * </ul>\n     *\n     * <p><strong>COMBINED SLL+LL PARSING</strong></p>\n     *\n     * <p>When LL-fallback is enabled upon SLL conflict, correct predictions are\n     * ensured regardless of how the termination condition is computed by this\n     * method. Due to the substantially higher cost of LL prediction, the\n     * prediction should only fall back to LL when the additional lookahead\n     * cannot lead to a unique SLL prediction.</p>\n     *\n     * <p>Assuming combined SLL+LL parsing, an SLL configuration set with only\n     * conflicting subsets should fall back to full LL, even if the\n     * configuration sets don't resolve to the same alternative (e.g.\n     * {@code {1,2}} and {@code {3,4}}. If there is at least one non-conflicting\n     * configuration, SLL could continue with the hopes that more lookahead will\n     * resolve via one of those non-conflicting configurations.</p>\n     *\n     * <p>Here's the prediction termination rule them: SLL (for SLL+LL parsing)\n     * stops when it sees only conflicting configuration subsets. In contrast,\n     * full LL keeps going when there is uncertainty.</p>\n     *\n     * <p><strong>HEURISTIC</strong></p>\n     *\n     * <p>As a heuristic, we stop prediction when we see any conflicting subset\n     * unless we see a state that only has one alternative associated with it.\n     * The single-alt-state thing lets prediction continue upon rules like\n     * (otherwise, it would admit defeat too soon):</p>\n     *\n     * <p>{@code [12|1|[], 6|2|[], 12|2|[]]. s : (ID | ID ID?) ';' ;}</p>\n     *\n     * <p>When the ATN simulation reaches the state before {@code ';'}, it has a\n     * DFA state that looks like: {@code [12|1|[], 6|2|[], 12|2|[]]}. Naturally\n     * {@code 12|1|[]} and {@code 12|2|[]} conflict, but we cannot stop\n     * processing this node because alternative to has another way to continue,\n     * via {@code [6|2|[]]}.</p>\n     *\n     * <p>It also let's us continue for this rule:</p>\n     *\n     * <p>{@code [1|1|[], 1|2|[], 8|3|[]] a : A | A | A B ;}</p>\n     *\n     * <p>After matching input A, we reach the stop state for rule A, state 1.\n     * State 8 is the state right before B. Clearly alternatives 1 and 2\n     * conflict and no amount of further lookahead will separate the two.\n     * However, alternative 3 will be able to continue and so we do not stop\n     * working on this state. In the previous example, we're concerned with\n     * states associated with the conflicting alternatives. Here alt 3 is not\n     * associated with the conflicting configs, but since we can continue\n     * looking for input reasonably, don't declare the state done.</p>\n     *\n     * <p><strong>PURE SLL PARSING</strong></p>\n     *\n     * <p>To handle pure SLL parsing, all we have to do is make sure that we\n     * combine stack contexts for configurations that differ only by semantic\n     * predicate. From there, we can do the usual SLL termination heuristic.</p>\n     *\n     * <p><strong>PREDICATES IN SLL+LL PARSING</strong></p>\n     *\n     * <p>SLL decisions don't evaluate predicates until after they reach DFA stop\n     * states because they need to create the DFA cache that works in all\n     * semantic situations. In contrast, full LL evaluates predicates collected\n     * during start state computation so it can ignore predicates thereafter.\n     * This means that SLL termination detection can totally ignore semantic\n     * predicates.</p>\n     *\n     * <p>Implementation-wise, {@link ATNConfigSet} combines stack contexts but not\n     * semantic predicate contexts so we might see two configurations like the\n     * following.</p>\n     *\n     * <p>{@code (s, 1, x, {}), (s, 1, x', {p})}</p>\n     *\n     * <p>Before testing these configurations against others, we have to merge\n     * {@code x} and {@code x'} (without modifying the existing configurations).\n     * For example, we test {@code (x+x')==x''} when looking for conflicts in\n     * the following configurations.</p>\n     *\n     * <p>{@code (s, 1, x, {}), (s, 1, x', {p}), (s, 2, x'', {})}</p>\n     *\n     * <p>If the configuration set has predicates (as indicated by\n     * {@link ATNConfigSet//hasSemanticContext}), this algorithm makes a copy of\n     * the configurations to strip out all of the predicates so that a standard\n     * {@link ATNConfigSet} will merge everything ignoring predicates.</p>\n     */\n    hasSLLConflictTerminatingPrediction: function( mode, configs) {\n        // Configs in rule stop states indicate reaching the end of the decision\n        // rule (local context) or end of start rule (full context). If all\n        // configs meet this condition, then none of the configurations is able\n        // to match additional input so we terminate prediction.\n        //\n        if (PredictionMode.allConfigsInRuleStopStates(configs)) {\n            return true;\n        }\n        // pure SLL mode parsing\n        if (mode === PredictionMode.SLL) {\n            // Don't bother with combining configs from different semantic\n            // contexts if we can fail over to full LL; costs more time\n            // since we'll often fail over anyway.\n            if (configs.hasSemanticContext) {\n                // dup configs, tossing out semantic predicates\n                const dup = new ATNConfigSet();\n                for(let i=0;i<configs.items.length;i++) {\n                    let c = configs.items[i];\n                    c = new ATNConfig({semanticContext:SemanticContext.NONE}, c);\n                    dup.add(c);\n                }\n                configs = dup;\n            }\n            // now we have combined contexts for configs with dissimilar preds\n        }\n        // pure SLL or combined SLL+LL mode parsing\n        const altsets = PredictionMode.getConflictingAltSubsets(configs);\n        return PredictionMode.hasConflictingAltSet(altsets) && !PredictionMode.hasStateAssociatedWithOneAlt(configs);\n    },\n\n    /**\n     * Checks if any configuration in {@code configs} is in a\n     * {@link RuleStopState}. Configurations meeting this condition have reached\n     * the end of the decision rule (local context) or end of start rule (full\n     * context).\n     *\n     * @param configs the configuration set to test\n     * @return {@code true} if any configuration in {@code configs} is in a\n     * {@link RuleStopState}, otherwise {@code false}\n     */\n    hasConfigInRuleStopState: function(configs) {\n        for(let i=0;i<configs.items.length;i++) {\n            const c = configs.items[i];\n            if (c.state instanceof RuleStopState) {\n                return true;\n            }\n        }\n        return false;\n    },\n\n    /**\n     * Checks if all configurations in {@code configs} are in a\n     * {@link RuleStopState}. Configurations meeting this condition have reached\n     * the end of the decision rule (local context) or end of start rule (full\n     * context).\n     *\n     * @param configs the configuration set to test\n     * @return {@code true} if all configurations in {@code configs} are in a\n     * {@link RuleStopState}, otherwise {@code false}\n     */\n    allConfigsInRuleStopStates: function(configs) {\n        for(let i=0;i<configs.items.length;i++) {\n            const c = configs.items[i];\n            if (!(c.state instanceof RuleStopState)) {\n                return false;\n            }\n        }\n        return true;\n    },\n\n    /**\n     *\n     * Full LL prediction termination.\n     *\n     * <p>Can we stop looking ahead during ATN simulation or is there some\n     * uncertainty as to which alternative we will ultimately pick, after\n     * consuming more input? Even if there are partial conflicts, we might know\n     * that everything is going to resolve to the same minimum alternative. That\n     * means we can stop since no more lookahead will change that fact. On the\n     * other hand, there might be multiple conflicts that resolve to different\n     * minimums. That means we need more look ahead to decide which of those\n     * alternatives we should predict.</p>\n     *\n     * <p>The basic idea is to split the set of configurations {@code C}, into\n     * conflicting subsets {@code (s, _, ctx, _)} and singleton subsets with\n     * non-conflicting configurations. Two configurations conflict if they have\n     * identical {@link ATNConfig//state} and {@link ATNConfig//context} values\n     * but different {@link ATNConfig//alt} value, e.g. {@code (s, i, ctx, _)}\n     * and {@code (s, j, ctx, _)} for {@code i!=j}.</p>\n     *\n     * <p>Reduce these configuration subsets to the set of possible alternatives.\n     * You can compute the alternative subsets in one pass as follows:</p>\n     *\n     * <p>{@code A_s,ctx = {i | (s, i, ctx, _)}} for each configuration in\n     * {@code C} holding {@code s} and {@code ctx} fixed.</p>\n     *\n     * <p>Or in pseudo-code, for each configuration {@code c} in {@code C}:</p>\n     *\n     * <pre>\n     * map[c] U= c.{@link ATNConfig//alt alt} // map hash/equals uses s and x, not\n     * alt and not pred\n     * </pre>\n     *\n     * <p>The values in {@code map} are the set of {@code A_s,ctx} sets.</p>\n     *\n     * <p>If {@code |A_s,ctx|=1} then there is no conflict associated with\n     * {@code s} and {@code ctx}.</p>\n     *\n     * <p>Reduce the subsets to singletons by choosing a minimum of each subset. If\n     * the union of these alternative subsets is a singleton, then no amount of\n     * more lookahead will help us. We will always pick that alternative. If,\n     * however, there is more than one alternative, then we are uncertain which\n     * alternative to predict and must continue looking for resolution. We may\n     * or may not discover an ambiguity in the future, even if there are no\n     * conflicting subsets this round.</p>\n     *\n     * <p>The biggest sin is to terminate early because it means we've made a\n     * decision but were uncertain as to the eventual outcome. We haven't used\n     * enough lookahead. On the other hand, announcing a conflict too late is no\n     * big deal; you will still have the conflict. It's just inefficient. It\n     * might even look until the end of file.</p>\n     *\n     * <p>No special consideration for semantic predicates is required because\n     * predicates are evaluated on-the-fly for full LL prediction, ensuring that\n     * no configuration contains a semantic context during the termination\n     * check.</p>\n     *\n     * <p><strong>CONFLICTING CONFIGS</strong></p>\n     *\n     * <p>Two configurations {@code (s, i, x)} and {@code (s, j, x')}, conflict\n     * when {@code i!=j} but {@code x=x'}. Because we merge all\n     * {@code (s, i, _)} configurations together, that means that there are at\n     * most {@code n} configurations associated with state {@code s} for\n     * {@code n} possible alternatives in the decision. The merged stacks\n     * complicate the comparison of configuration contexts {@code x} and\n     * {@code x'}. Sam checks to see if one is a subset of the other by calling\n     * merge and checking to see if the merged result is either {@code x} or\n     * {@code x'}. If the {@code x} associated with lowest alternative {@code i}\n     * is the superset, then {@code i} is the only possible prediction since the\n     * others resolve to {@code min(i)} as well. However, if {@code x} is\n     * associated with {@code j>i} then at least one stack configuration for\n     * {@code j} is not in conflict with alternative {@code i}. The algorithm\n     * should keep going, looking for more lookahead due to the uncertainty.</p>\n     *\n     * <p>For simplicity, I'm doing a equality check between {@code x} and\n     * {@code x'} that lets the algorithm continue to consume lookahead longer\n     * than necessary. The reason I like the equality is of course the\n     * simplicity but also because that is the test you need to detect the\n     * alternatives that are actually in conflict.</p>\n     *\n     * <p><strong>CONTINUE/STOP RULE</strong></p>\n     *\n     * <p>Continue if union of resolved alternative sets from non-conflicting and\n     * conflicting alternative subsets has more than one alternative. We are\n     * uncertain about which alternative to predict.</p>\n     *\n     * <p>The complete set of alternatives, {@code [i for (_,i,_)]}, tells us which\n     * alternatives are still in the running for the amount of input we've\n     * consumed at this point. The conflicting sets let us to strip away\n     * configurations that won't lead to more states because we resolve\n     * conflicts to the configuration with a minimum alternate for the\n     * conflicting set.</p>\n     *\n     * <p><strong>CASES</strong></p>\n     *\n     * <ul>\n     *\n     * <li>no conflicts and more than 1 alternative in set =&gt; continue</li>\n     *\n     * <li> {@code (s, 1, x)}, {@code (s, 2, x)}, {@code (s, 3, z)},\n     * {@code (s', 1, y)}, {@code (s', 2, y)} yields non-conflicting set\n     * {@code {3}} U conflicting sets {@code min({1,2})} U {@code min({1,2})} =\n     * {@code {1,3}} =&gt; continue\n     * </li>\n     *\n     * <li>{@code (s, 1, x)}, {@code (s, 2, x)}, {@code (s', 1, y)},\n     * {@code (s', 2, y)}, {@code (s'', 1, z)} yields non-conflicting set\n     * {@code {1}} U conflicting sets {@code min({1,2})} U {@code min({1,2})} =\n     * {@code {1}} =&gt; stop and predict 1</li>\n     *\n     * <li>{@code (s, 1, x)}, {@code (s, 2, x)}, {@code (s', 1, y)},\n     * {@code (s', 2, y)} yields conflicting, reduced sets {@code {1}} U\n     * {@code {1}} = {@code {1}} =&gt; stop and predict 1, can announce\n     * ambiguity {@code {1,2}}</li>\n     *\n     * <li>{@code (s, 1, x)}, {@code (s, 2, x)}, {@code (s', 2, y)},\n     * {@code (s', 3, y)} yields conflicting, reduced sets {@code {1}} U\n     * {@code {2}} = {@code {1,2}} =&gt; continue</li>\n     *\n     * <li>{@code (s, 1, x)}, {@code (s, 2, x)}, {@code (s', 3, y)},\n     * {@code (s', 4, y)} yields conflicting, reduced sets {@code {1}} U\n     * {@code {3}} = {@code {1,3}} =&gt; continue</li>\n     *\n     * </ul>\n     *\n     * <p><strong>EXACT AMBIGUITY DETECTION</strong></p>\n     *\n     * <p>If all states report the same conflicting set of alternatives, then we\n     * know we have the exact ambiguity set.</p>\n     *\n     * <p><code>|A_<em>i</em>|&gt;1</code> and\n     * <code>A_<em>i</em> = A_<em>j</em></code> for all <em>i</em>, <em>j</em>.</p>\n     *\n     * <p>In other words, we continue examining lookahead until all {@code A_i}\n     * have more than one alternative and all {@code A_i} are the same. If\n     * {@code A={{1,2}, {1,3}}}, then regular LL prediction would terminate\n     * because the resolved set is {@code {1}}. To determine what the real\n     * ambiguity is, we have to know whether the ambiguity is between one and\n     * two or one and three so we keep going. We can only stop prediction when\n     * we need exact ambiguity detection when the sets look like\n     * {@code A={{1,2}}} or {@code {{1,2},{1,2}}}, etc...</p>\n     */\n    resolvesToJustOneViableAlt: function(altsets) {\n        return PredictionMode.getSingleViableAlt(altsets);\n    },\n\n    /**\n     * Determines if every alternative subset in {@code altsets} contains more\n     * than one alternative.\n     *\n     * @param altsets a collection of alternative subsets\n     * @return {@code true} if every {@link BitSet} in {@code altsets} has\n     * {@link BitSet//cardinality cardinality} &gt; 1, otherwise {@code false}\n     */\n    allSubsetsConflict: function(altsets) {\n        return ! PredictionMode.hasNonConflictingAltSet(altsets);\n    },\n    /**\n     * Determines if any single alternative subset in {@code altsets} contains\n     * exactly one alternative.\n     *\n     * @param altsets a collection of alternative subsets\n     * @return {@code true} if {@code altsets} contains a {@link BitSet} with\n     * {@link BitSet//cardinality cardinality} 1, otherwise {@code false}\n     */\n    hasNonConflictingAltSet: function(altsets) {\n        for(let i=0;i<altsets.length;i++) {\n            const alts = altsets[i];\n            if (alts.length===1) {\n                return true;\n            }\n        }\n        return false;\n    },\n\n\n    /**\n     * Determines if any single alternative subset in {@code altsets} contains\n     * more than one alternative.\n     *\n     * @param altsets a collection of alternative subsets\n     * @return {@code true} if {@code altsets} contains a {@link BitSet} with\n     * {@link BitSet//cardinality cardinality} &gt; 1, otherwise {@code false}\n     */\n    hasConflictingAltSet: function(altsets) {\n        for(let i=0;i<altsets.length;i++) {\n            const alts = altsets[i];\n            if (alts.length>1) {\n                return true;\n            }\n        }\n        return false;\n    },\n\n\n    /**\n     * Determines if every alternative subset in {@code altsets} is equivalent.\n     *\n     * @param altsets a collection of alternative subsets\n     * @return {@code true} if every member of {@code altsets} is equal to the\n     * others, otherwise {@code false}\n     */\n    allSubsetsEqual: function(altsets) {\n        let first = null;\n        for(let i=0;i<altsets.length;i++) {\n            const alts = altsets[i];\n            if (first === null) {\n                first = alts;\n            } else if (alts!==first) {\n                return false;\n            }\n        }\n        return true;\n    },\n\n\n    /**\n     * Returns the unique alternative predicted by all alternative subsets in\n     * {@code altsets}. If no such alternative exists, this method returns\n     * {@link ATN//INVALID_ALT_NUMBER}.\n     *\n     * @param altsets a collection of alternative subsets\n     */\n    getUniqueAlt: function(altsets) {\n        const all = PredictionMode.getAlts(altsets);\n        if (all.length===1) {\n            return all.minValue();\n        } else {\n            return ATN.INVALID_ALT_NUMBER;\n        }\n    },\n\n    /**\n     * Gets the complete set of represented alternatives for a collection of\n     * alternative subsets. This method returns the union of each {@link BitSet}\n     * in {@code altsets}.\n     *\n     * @param altsets a collection of alternative subsets\n     * @return the set of represented alternatives in {@code altsets}\n     */\n    getAlts: function(altsets) {\n        const all = new BitSet();\n        altsets.map( function(alts) { all.or(alts); });\n        return all;\n    },\n\n    /**\n     * This function gets the conflicting alt subsets from a configuration set.\n     * For each configuration {@code c} in {@code configs}:\n     *\n     * <pre>\n     * map[c] U= c.{@link ATNConfig//alt alt} // map hash/equals uses s and x, not\n     * alt and not pred\n     * </pre>\n     */\n    getConflictingAltSubsets: function(configs) {\n        const configToAlts = new HashMap();\n        configToAlts.hashFunction = function(cfg) { HashCode.hashStuff(cfg.state.stateNumber, cfg.context); };\n        configToAlts.equalsFunction = function(c1, c2) { return c1.state.stateNumber === c2.state.stateNumber && c1.context.equals(c2.context);};\n        configs.items.map(function(cfg) {\n            let alts = configToAlts.get(cfg);\n            if (alts === null) {\n                alts = new BitSet();\n                configToAlts.set(cfg, alts);\n            }\n            alts.add(cfg.alt);\n        });\n        return configToAlts.getValues();\n    },\n\n    /**\n     * Get a map from state to alt subset from a configuration set. For each\n     * configuration {@code c} in {@code configs}:\n     *\n     * <pre>\n     * map[c.{@link ATNConfig//state state}] U= c.{@link ATNConfig//alt alt}\n     * </pre>\n     */\n    getStateToAltMap: function(configs) {\n        const m = new AltDict();\n        configs.items.map(function(c) {\n            let alts = m.get(c.state);\n            if (alts === null) {\n                alts = new BitSet();\n                m.set(c.state, alts);\n            }\n            alts.add(c.alt);\n        });\n        return m;\n    },\n\n    hasStateAssociatedWithOneAlt: function(configs) {\n        const values = PredictionMode.getStateToAltMap(configs).values();\n        for(let i=0;i<values.length;i++) {\n            if (values[i].length===1) {\n                return true;\n            }\n        }\n        return false;\n    },\n\n    getSingleViableAlt: function(altsets) {\n        let result = null;\n        for(let i=0;i<altsets.length;i++) {\n            const alts = altsets[i];\n            const minAlt = alts.minValue();\n            if(result===null) {\n                result = minAlt;\n            } else if(result!==minAlt) { // more than 1 viable alt\n                return ATN.INVALID_ALT_NUMBER;\n            }\n        }\n        return result;\n    }\n};\n\nexport default PredictionMode;\n","/* Copyright (c) 2012-2022 The ANTLR Project Contributors. All rights reserved.\n * Use is of this file is governed by the BSD 3-clause license that\n * can be found in the LICENSE.txt file in the project root.\n */\nimport RecognitionException from \"./RecognitionException.js\";\n\n/**\n * Indicates that the parser could not decide which of two or more paths\n * to take based upon the remaining input. It tracks the starting token\n * of the offending input and also knows where the parser was\n * in the various paths when the error. Reported by reportNoViableAlternative()\n */\n\nexport default class NoViableAltException extends RecognitionException {\n    constructor(recognizer, input, startToken, offendingToken, deadEndConfigs, ctx) {\n        ctx = ctx || recognizer._ctx;\n        offendingToken = offendingToken || recognizer.getCurrentToken();\n        startToken = startToken || recognizer.getCurrentToken();\n        input = input || recognizer.getInputStream();\n        super({message: \"\", recognizer: recognizer, input: input, ctx: ctx});\n        // Which configurations did we try at input.index() that couldn't match\n        // input.LT(1)?//\n        this.deadEndConfigs = deadEndConfigs;\n        // The token object at the start index; the input stream might\n        // not be buffering tokens so get a reference to it. (At the\n        // time the error occurred, of course the stream needs to keep a\n        // buffer all of the tokens but later we might not have access to those.)\n        this.startToken = startToken;\n        this.offendingToken = offendingToken;\n    }\n}\n","/* Copyright (c) 2012-2022 The ANTLR Project Contributors. All rights reserved.\n * Use is of this file is governed by the BSD 3-clause license that\n * can be found in the LICENSE.txt file in the project root.\n */\nimport HashMap from \"../misc/HashMap.js\";\n\nexport default class DoubleDict {\n\n    constructor(defaultMapCtor) {\n        this.defaultMapCtor = defaultMapCtor || HashMap;\n        this.cacheMap = new this.defaultMapCtor();\n    }\n\n    get(a, b) {\n        const d = this.cacheMap.get(a) || null;\n        return d === null ? null : (d.get(b) || null);\n    }\n\n    set(a, b, o) {\n        let d = this.cacheMap.get(a) || null;\n        if (d === null) {\n            d = new this.defaultMapCtor();\n            this.cacheMap.set(a, d);\n        }\n        d.set(b, o);\n    }\n\n}\n","/* Copyright (c) 2012-2022 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause license that\n * can be found in the LICENSE.txt file in the project root.\n */\n\nimport ATN from './ATN.js';\nimport ATNState from '../state/ATNState.js';\nimport RuleStopState from '../state/RuleStopState.js';\nimport ATNConfig from './ATNConfig.js';\nimport ATNConfigSet from './ATNConfigSet.js';\nimport Token from '../Token.js';\nimport DFAState from '../dfa/DFAState.js';\nimport PredPrediction from '../dfa/PredPrediction.js';\nimport ATNSimulator from './ATNSimulator.js';\nimport PredictionMode from './PredictionMode.js';\nimport RuleContext from '../context/RuleContext.js';\nimport SemanticContext from './SemanticContext.js';\nimport PredictionContext from '../context/PredictionContext.js';\nimport Interval from '../misc/Interval.js';\nimport Transition from '../transition/Transition.js';\nimport SetTransition from '../transition/SetTransition.js';\nimport NotSetTransition from '../transition/NotSetTransition.js';\nimport RuleTransition from '../transition/RuleTransition.js';\nimport ActionTransition from '../transition/ActionTransition.js';\nimport NoViableAltException from '../error/NoViableAltException.js';\nimport SingletonPredictionContext from '../context/SingletonPredictionContext.js';\nimport {predictionContextFromRuleContext} from '../context/PredictionContextUtils.js';\nimport AtomTransition from \"../transition/AtomTransition.js\";\nimport arrayToString from \"../utils/arrayToString.js\";\nimport BitSet from \"../misc/BitSet.js\";\nimport DoubleDict from \"../utils/DoubleDict.js\";\nimport HashSet from \"../misc/HashSet.js\";\n\n/**\n * The embodiment of the adaptive LL(*), ALL(*), parsing strategy.\n *\n * <p>\n * The basic complexity of the adaptive strategy makes it harder to understand.\n * We begin with ATN simulation to build paths in a DFA. Subsequent prediction\n * requests go through the DFA first. If they reach a state without an edge for\n * the current symbol, the algorithm fails over to the ATN simulation to\n * complete the DFA path for the current input (until it finds a conflict state\n * or uniquely predicting state).</p>\n *\n * <p>\n * All of that is done without using the outer context because we want to create\n * a DFA that is not dependent upon the rule invocation stack when we do a\n * prediction. One DFA works in all contexts. We avoid using context not\n * necessarily because it's slower, although it can be, but because of the DFA\n * caching problem. The closure routine only considers the rule invocation stack\n * created during prediction beginning in the decision rule. For example, if\n * prediction occurs without invoking another rule's ATN, there are no context\n * stacks in the configurations. When lack of context leads to a conflict, we\n * don't know if it's an ambiguity or a weakness in the strong LL(*) parsing\n * strategy (versus full LL(*)).</p>\n *\n * <p>\n * When SLL yields a configuration set with conflict, we rewind the input and\n * retry the ATN simulation, this time using full outer context without adding\n * to the DFA. Configuration context stacks will be the full invocation stacks\n * from the start rule. If we get a conflict using full context, then we can\n * definitively say we have a true ambiguity for that input sequence. If we\n * don't get a conflict, it implies that the decision is sensitive to the outer\n * context. (It is not context-sensitive in the sense of context-sensitive\n * grammars.)</p>\n *\n * <p>\n * The next time we reach this DFA state with an SLL conflict, through DFA\n * simulation, we will again retry the ATN simulation using full context mode.\n * This is slow because we can't save the results and have to \"interpret\" the\n * ATN each time we get that input.</p>\n *\n * <p>\n * <strong>CACHING FULL CONTEXT PREDICTIONS</strong></p>\n *\n * <p>\n * We could cache results from full context to predicted alternative easily and\n * that saves a lot of time but doesn't work in presence of predicates. The set\n * of visible predicates from the ATN start state changes depending on the\n * context, because closure can fall off the end of a rule. I tried to cache\n * tuples (stack context, semantic context, predicted alt) but it was slower\n * than interpreting and much more complicated. Also required a huge amount of\n * memory. The goal is not to create the world's fastest parser anyway. I'd like\n * to keep this algorithm simple. By launching multiple threads, we can improve\n * the speed of parsing across a large number of files.</p>\n *\n * <p>\n * There is no strict ordering between the amount of input used by SLL vs LL,\n * which makes it really hard to build a cache for full context. Let's say that\n * we have input A B C that leads to an SLL conflict with full context X. That\n * implies that using X we might only use A B but we could also use A B C D to\n * resolve conflict. Input A B C D could predict alternative 1 in one position\n * in the input and A B C E could predict alternative 2 in another position in\n * input. The conflicting SLL configurations could still be non-unique in the\n * full context prediction, which would lead us to requiring more input than the\n * original A B C.\tTo make a\tprediction cache work, we have to track\tthe exact\n * input\tused during the previous prediction. That amounts to a cache that maps\n * X to a specific DFA for that context.</p>\n *\n * <p>\n * Something should be done for left-recursive expression predictions. They are\n * likely LL(1) + pred eval. Easier to do the whole SLL unless error and retry\n * with full LL thing Sam does.</p>\n *\n * <p>\n * <strong>AVOIDING FULL CONTEXT PREDICTION</strong></p>\n *\n * <p>\n * We avoid doing full context retry when the outer context is empty, we did not\n * dip into the outer context by falling off the end of the decision state rule,\n * or when we force SLL mode.</p>\n *\n * <p>\n * As an example of the not dip into outer context case, consider as super\n * constructor calls versus function calls. One grammar might look like\n * this:</p>\n *\n * <pre>\n * ctorBody\n *   : '{' superCall? stat* '}'\n *   ;\n * </pre>\n *\n * <p>\n * Or, you might see something like</p>\n *\n * <pre>\n * stat\n *   : superCall ';'\n *   | expression ';'\n *   | ...\n *   ;\n * </pre>\n *\n * <p>\n * In both cases I believe that no closure operations will dip into the outer\n * context. In the first case ctorBody in the worst case will stop at the '}'.\n * In the 2nd case it should stop at the ';'. Both cases should stay within the\n * entry rule and not dip into the outer context.</p>\n *\n * <p>\n * <strong>PREDICATES</strong></p>\n *\n * <p>\n * Predicates are always evaluated if present in either SLL or LL both. SLL and\n * LL simulation deals with predicates differently. SLL collects predicates as\n * it performs closure operations like ANTLR v3 did. It delays predicate\n * evaluation until it reaches and accept state. This allows us to cache the SLL\n * ATN simulation whereas, if we had evaluated predicates on-the-fly during\n * closure, the DFA state configuration sets would be different and we couldn't\n * build up a suitable DFA.</p>\n *\n * <p>\n * When building a DFA accept state during ATN simulation, we evaluate any\n * predicates and return the sole semantically valid alternative. If there is\n * more than 1 alternative, we report an ambiguity. If there are 0 alternatives,\n * we throw an exception. Alternatives without predicates act like they have\n * true predicates. The simple way to think about it is to strip away all\n * alternatives with false predicates and choose the minimum alternative that\n * remains.</p>\n *\n * <p>\n * When we start in the DFA and reach an accept state that's predicated, we test\n * those and return the minimum semantically viable alternative. If no\n * alternatives are viable, we throw an exception.</p>\n *\n * <p>\n * During full LL ATN simulation, closure always evaluates predicates and\n * on-the-fly. This is crucial to reducing the configuration set size during\n * closure. It hits a landmine when parsing with the Java grammar, for example,\n * without this on-the-fly evaluation.</p>\n *\n * <p>\n * <strong>SHARING DFA</strong></p>\n *\n * <p>\n * All instances of the same parser share the same decision DFAs through a\n * static field. Each instance gets its own ATN simulator but they share the\n * same {@link //decisionToDFA} field. They also share a\n * {@link PredictionContextCache} object that makes sure that all\n * {@link PredictionContext} objects are shared among the DFA states. This makes\n * a big size difference.</p>\n *\n * <p>\n * <strong>THREAD SAFETY</strong></p>\n *\n * <p>\n * The {@link ParserATNSimulator} locks on the {@link //decisionToDFA} field when\n * it adds a new DFA object to that array. {@link //addDFAEdge}\n * locks on the DFA for the current decision when setting the\n * {@link DFAState//edges} field. {@link //addDFAState} locks on\n * the DFA for the current decision when looking up a DFA state to see if it\n * already exists. We must make sure that all requests to add DFA states that\n * are equivalent result in the same shared DFA object. This is because lots of\n * threads will be trying to update the DFA at once. The\n * {@link //addDFAState} method also locks inside the DFA lock\n * but this time on the shared context cache when it rebuilds the\n * configurations' {@link PredictionContext} objects using cached\n * subgraphs/nodes. No other locking occurs, even during DFA simulation. This is\n * safe as long as we can guarantee that all threads referencing\n * {@code s.edge[t]} get the same physical target {@link DFAState}, or\n * {@code null}. Once into the DFA, the DFA simulation does not reference the\n * {@link DFA//states} map. It follows the {@link DFAState//edges} field to new\n * targets. The DFA simulator will either find {@link DFAState//edges} to be\n * {@code null}, to be non-{@code null} and {@code dfa.edges[t]} null, or\n * {@code dfa.edges[t]} to be non-null. The\n * {@link //addDFAEdge} method could be racing to set the field\n * but in either case the DFA simulator works; if {@code null}, and requests ATN\n * simulation. It could also race trying to get {@code dfa.edges[t]}, but either\n * way it will work because it's not doing a test and set operation.</p>\n *\n * <p>\n * <strong>Starting with SLL then failing to combined SLL/LL (Two-Stage\n * Parsing)</strong></p>\n *\n * <p>\n * Sam pointed out that if SLL does not give a syntax error, then there is no\n * point in doing full LL, which is slower. We only have to try LL if we get a\n * syntax error. For maximum speed, Sam starts the parser set to pure SLL\n * mode with the {@link BailErrorStrategy}:</p>\n *\n * <pre>\n * parser.{@link Parser//getInterpreter() getInterpreter()}.{@link //setPredictionMode setPredictionMode}{@code (}{@link PredictionMode//SLL}{@code )};\n * parser.{@link Parser//setErrorHandler setErrorHandler}(new {@link BailErrorStrategy}());\n * </pre>\n *\n * <p>\n * If it does not get a syntax error, then we're done. If it does get a syntax\n * error, we need to retry with the combined SLL/LL strategy.</p>\n *\n * <p>\n * The reason this works is as follows. If there are no SLL conflicts, then the\n * grammar is SLL (at least for that input set). If there is an SLL conflict,\n * the full LL analysis must yield a set of viable alternatives which is a\n * subset of the alternatives reported by SLL. If the LL set is a singleton,\n * then the grammar is LL but not SLL. If the LL set is the same size as the SLL\n * set, the decision is SLL. If the LL set has size &gt; 1, then that decision\n * is truly ambiguous on the current input. If the LL set is smaller, then the\n * SLL conflict resolution might choose an alternative that the full LL would\n * rule out as a possibility based upon better context information. If that's\n * the case, then the SLL parse will definitely get an error because the full LL\n * analysis says it's not viable. If SLL conflict resolution chooses an\n * alternative within the LL set, them both SLL and LL would choose the same\n * alternative because they both choose the minimum of multiple conflicting\n * alternatives.</p>\n *\n * <p>\n * Let's say we have a set of SLL conflicting alternatives {@code {1, 2, 3}} and\n * a smaller LL set called <em>s</em>. If <em>s</em> is {@code {2, 3}}, then SLL\n * parsing will get an error because SLL will pursue alternative 1. If\n * <em>s</em> is {@code {1, 2}} or {@code {1, 3}} then both SLL and LL will\n * choose the same alternative because alternative one is the minimum of either\n * set. If <em>s</em> is {@code {2}} or {@code {3}} then SLL will get a syntax\n * error. If <em>s</em> is {@code {1}} then SLL will succeed.</p>\n *\n * <p>\n * Of course, if the input is invalid, then we will get an error for sure in\n * both SLL and LL parsing. Erroneous input will therefore require 2 passes over\n * the input.</p>\n */\nexport default class ParserATNSimulator extends ATNSimulator {\n    constructor(parser, atn, decisionToDFA, sharedContextCache) {\n        super(atn, sharedContextCache);\n        this.parser = parser;\n        this.decisionToDFA = decisionToDFA;\n        // SLL, LL, or LL + exact ambig detection?//\n        this.predictionMode = PredictionMode.LL;\n        // LAME globals to avoid parameters!!!!! I need these down deep in predTransition\n        this._input = null;\n        this._startIndex = 0;\n        this._outerContext = null;\n        this._dfa = null;\n        /**\n         * Each prediction operation uses a cache for merge of prediction contexts.\n         *  Don't keep around as it wastes huge amounts of memory. DoubleKeyMap\n         *  isn't synchronized but we're ok since two threads shouldn't reuse same\n         *  parser/atnsim object because it can only handle one input at a time.\n         *  This maps graphs a and b to merged result c. (a,b)&rarr;c. We can avoid\n         *  the merge if we ever see a and b again.  Note that (b,a)&rarr;c should\n         *  also be examined during cache lookup.\n         */\n        this.mergeCache = null;\n        this.debug = false;\n        this.debug_closure = false;\n        this.debug_add = false;\n        this.trace_atn_sim = false;\n        this.dfa_debug = false;\n        this.retry_debug = false;\n    }\n\n    reset() {}\n\n    adaptivePredict(input, decision, outerContext) {\n        if (this.debug || this.trace_atn_sim) {\n            console.log(\"adaptivePredict decision \" + decision +\n                                   \" exec LA(1)==\" + this.getLookaheadName(input) +\n                                   \" line \" + input.LT(1).line + \":\" +\n                                   input.LT(1).column);\n        }\n        this._input = input;\n        this._startIndex = input.index;\n        this._outerContext = outerContext;\n\n        const dfa = this.decisionToDFA[decision];\n        this._dfa = dfa;\n        const m = input.mark();\n        const index = input.index;\n\n        // Now we are certain to have a specific decision's DFA\n        // But, do we still need an initial state?\n        try {\n            let s0;\n            if (dfa.precedenceDfa) {\n                // the start state for a precedence DFA depends on the current\n                // parser precedence, and is provided by a DFA method.\n                s0 = dfa.getPrecedenceStartState(this.parser.getPrecedence());\n            } else {\n                // the start state for a \"regular\" DFA is just s0\n                s0 = dfa.s0;\n            }\n            if (s0===null) {\n                if (outerContext===null) {\n                    outerContext = RuleContext.EMPTY;\n                }\n                if (this.debug ) {\n                    console.log(\"predictATN decision \" + dfa.decision +\n                                       \" exec LA(1)==\" + this.getLookaheadName(input) +\n                                       \", outerContext=\" + outerContext.toString(this.parser.ruleNames));\n                }\n\n                const fullCtx = false;\n                let s0_closure = this.computeStartState(dfa.atnStartState, RuleContext.EMPTY, fullCtx);\n\n                if( dfa.precedenceDfa) {\n                    // If this is a precedence DFA, we use applyPrecedenceFilter\n                    // to convert the computed start state to a precedence start\n                    // state. We then use DFA.setPrecedenceStartState to set the\n                    // appropriate start state for the precedence level rather\n                    // than simply setting DFA.s0.\n                    //\n                    dfa.s0.configs = s0_closure; // not used for prediction but useful to know start configs anyway\n                    s0_closure = this.applyPrecedenceFilter(s0_closure);\n                    s0 = this.addDFAState(dfa, new DFAState(null, s0_closure));\n                    dfa.setPrecedenceStartState(this.parser.getPrecedence(), s0);\n                } else {\n                    s0 = this.addDFAState(dfa, new DFAState(null, s0_closure));\n                    dfa.s0 = s0;\n                }\n            }\n            const alt = this.execATN(dfa, s0, input, index, outerContext);\n            if (this.debug) {\n                console.log(\"DFA after predictATN: \" + dfa.toString(this.parser.literalNames, this.parser.symbolicNames));\n            }\n            return alt;\n        } finally {\n            this._dfa = null;\n            this.mergeCache = null; // wack cache after each prediction\n            input.seek(index);\n            input.release(m);\n        }\n    }\n\n    /**\n     * Performs ATN simulation to compute a predicted alternative based\n     *  upon the remaining input, but also updates the DFA cache to avoid\n     *  having to traverse the ATN again for the same input sequence.\n     *\n     * There are some key conditions we're looking for after computing a new\n     * set of ATN configs (proposed DFA state):\n     *       if the set is empty, there is no viable alternative for current symbol\n     *       does the state uniquely predict an alternative?\n     *       does the state have a conflict that would prevent us from\n     *         putting it on the work list?\n     *\n     * We also have some key operations to do:\n     *       add an edge from previous DFA state to potentially new DFA state, D,\n     *         upon current symbol but only if adding to work list, which means in all\n     *         cases except no viable alternative (and possibly non-greedy decisions?)\n     *       collecting predicates and adding semantic context to DFA accept states\n     *       adding rule context to context-sensitive DFA accept states\n     *       consuming an input symbol\n     *       reporting a conflict\n     *       reporting an ambiguity\n     *       reporting a context sensitivity\n     *       reporting insufficient predicates\n     *\n     * cover these cases:\n     *    dead end\n     *    single alt\n     *    single alt + preds\n     *    conflict\n     *    conflict + preds\n     *\n     */\n    execATN(dfa, s0, input, startIndex, outerContext ) {\n        if (this.debug || this.trace_atn_sim) {\n            console.log(\"execATN decision \" + dfa.decision +\n                        \", DFA state \" + s0 +\n                        \", LA(1)==\" + this.getLookaheadName(input) +\n                        \" line \" + input.LT(1).line + \":\" + input.LT(1).column);\n        }\n        let alt;\n        let previousD = s0;\n\n        if (this.debug) {\n            console.log(\"s0 = \" + s0);\n        }\n        let t = input.LA(1);\n        for(;;) { // while more work\n            let D = this.getExistingTargetState(previousD, t);\n            if(D===null) {\n                D = this.computeTargetState(dfa, previousD, t);\n            }\n            if(D===ATNSimulator.ERROR) {\n                // if any configs in previous dipped into outer context, that\n                // means that input up to t actually finished entry rule\n                // at least for SLL decision. Full LL doesn't dip into outer\n                // so don't need special case.\n                // We will get an error no matter what so delay until after\n                // decision; better error message. Also, no reachable target\n                // ATN states in SLL implies LL will also get nowhere.\n                // If conflict in states that dip out, choose min since we\n                // will get error no matter what.\n                const e = this.noViableAlt(input, outerContext, previousD.configs, startIndex);\n                input.seek(startIndex);\n                alt = this.getSynValidOrSemInvalidAltThatFinishedDecisionEntryRule(previousD.configs, outerContext);\n                if(alt!==ATN.INVALID_ALT_NUMBER) {\n                    return alt;\n                } else {\n                    throw e;\n                }\n            }\n            if(D.requiresFullContext && this.predictionMode !== PredictionMode.SLL) {\n                // IF PREDS, MIGHT RESOLVE TO SINGLE ALT => SLL (or syntax error)\n                let conflictingAlts = null;\n                if (D.predicates!==null) {\n                    if (this.debug) {\n                        console.log(\"DFA state has preds in DFA sim LL failover\");\n                    }\n                    const conflictIndex = input.index;\n                    if(conflictIndex !== startIndex) {\n                        input.seek(startIndex);\n                    }\n                    conflictingAlts = this.evalSemanticContext(D.predicates, outerContext, true);\n                    if (conflictingAlts.length===1) {\n                        if(this.debug) {\n                            console.log(\"Full LL avoided\");\n                        }\n                        return conflictingAlts.minValue();\n                    }\n                    if (conflictIndex !== startIndex) {\n                        // restore the index so reporting the fallback to full\n                        // context occurs with the index at the correct spot\n                        input.seek(conflictIndex);\n                    }\n                }\n                if (this.dfa_debug) {\n                    console.log(\"ctx sensitive state \" + outerContext +\" in \" + D);\n                }\n                const fullCtx = true;\n                const s0_closure = this.computeStartState(dfa.atnStartState, outerContext, fullCtx);\n                this.reportAttemptingFullContext(dfa, conflictingAlts, D.configs, startIndex, input.index);\n                alt = this.execATNWithFullContext(dfa, D, s0_closure, input, startIndex, outerContext);\n                return alt;\n            }\n            if (D.isAcceptState) {\n                if (D.predicates===null) {\n                    return D.prediction;\n                }\n                const stopIndex = input.index;\n                input.seek(startIndex);\n                const alts = this.evalSemanticContext(D.predicates, outerContext, true);\n                if (alts.length===0) {\n                    throw this.noViableAlt(input, outerContext, D.configs, startIndex);\n                } else if (alts.length===1) {\n                    return alts.minValue();\n                } else {\n                    // report ambiguity after predicate evaluation to make sure the correct set of ambig alts is reported.\n                    this.reportAmbiguity(dfa, D, startIndex, stopIndex, false, alts, D.configs);\n                    return alts.minValue();\n                }\n            }\n            previousD = D;\n\n            if (t !== Token.EOF) {\n                input.consume();\n                t = input.LA(1);\n            }\n        }\n    }\n\n    /**\n     * Get an existing target state for an edge in the DFA. If the target state\n     * for the edge has not yet been computed or is otherwise not available,\n     * this method returns {@code null}.\n     *\n     * @param previousD The current DFA state\n     * @param t The next input symbol\n     * @return The existing target DFA state for the given input symbol\n     * {@code t}, or {@code null} if the target state for this edge is not\n     * already cached\n     */\n    getExistingTargetState(previousD, t) {\n        const edges = previousD.edges;\n        if (edges===null) {\n            return null;\n        } else {\n            return edges[t + 1] || null;\n        }\n    }\n\n    /**\n     * Compute a target state for an edge in the DFA, and attempt to add the\n     * computed state and corresponding edge to the DFA.\n     *\n     * @param dfa The DFA\n     * @param previousD The current DFA state\n     * @param t The next input symbol\n     *\n     * @return The computed target DFA state for the given input symbol\n     * {@code t}. If {@code t} does not lead to a valid DFA state, this method\n     * returns {@link //ERROR\n     */\n    computeTargetState(dfa, previousD, t) {\n       const reach = this.computeReachSet(previousD.configs, t, false);\n        if(reach===null) {\n            this.addDFAEdge(dfa, previousD, t, ATNSimulator.ERROR);\n            return ATNSimulator.ERROR;\n        }\n        // create new target state; we'll add to DFA after it's complete\n        let D = new DFAState(null, reach);\n\n        const predictedAlt = this.getUniqueAlt(reach);\n\n        if (this.debug) {\n            const altSubSets = PredictionMode.getConflictingAltSubsets(reach);\n            console.log(\"SLL altSubSets=\" + arrayToString(altSubSets) +\n                        /*\", previous=\" + previousD.configs + */\n                        \", configs=\" + reach +\n                        \", predict=\" + predictedAlt +\n                        \", allSubsetsConflict=\" +\n                        PredictionMode.allSubsetsConflict(altSubSets) + \", conflictingAlts=\" +\n                        this.getConflictingAlts(reach));\n        }\n        if (predictedAlt!==ATN.INVALID_ALT_NUMBER) {\n            // NO CONFLICT, UNIQUELY PREDICTED ALT\n            D.isAcceptState = true;\n            D.configs.uniqueAlt = predictedAlt;\n            D.prediction = predictedAlt;\n        } else if (PredictionMode.hasSLLConflictTerminatingPrediction(this.predictionMode, reach)) {\n            // MORE THAN ONE VIABLE ALTERNATIVE\n            D.configs.conflictingAlts = this.getConflictingAlts(reach);\n            D.requiresFullContext = true;\n            // in SLL-only mode, we will stop at this state and return the minimum alt\n            D.isAcceptState = true;\n            D.prediction = D.configs.conflictingAlts.minValue();\n        }\n        if (D.isAcceptState && D.configs.hasSemanticContext) {\n            this.predicateDFAState(D, this.atn.getDecisionState(dfa.decision));\n            if( D.predicates!==null) {\n                D.prediction = ATN.INVALID_ALT_NUMBER;\n            }\n        }\n        // all adds to dfa are done after we've created full D state\n        D = this.addDFAEdge(dfa, previousD, t, D);\n        return D;\n    }\n\n    predicateDFAState(dfaState, decisionState) {\n        // We need to test all predicates, even in DFA states that\n        // uniquely predict alternative.\n        const nalts = decisionState.transitions.length;\n        // Update DFA so reach becomes accept state with (predicate,alt)\n        // pairs if preds found for conflicting alts\n        const altsToCollectPredsFrom = this.getConflictingAltsOrUniqueAlt(dfaState.configs);\n        const altToPred = this.getPredsForAmbigAlts(altsToCollectPredsFrom, dfaState.configs, nalts);\n        if (altToPred!==null) {\n            dfaState.predicates = this.getPredicatePredictions(altsToCollectPredsFrom, altToPred);\n            dfaState.prediction = ATN.INVALID_ALT_NUMBER; // make sure we use preds\n        } else {\n            // There are preds in configs but they might go away\n            // when OR'd together like {p}? || NONE == NONE. If neither\n            // alt has preds, resolve to min alt\n            dfaState.prediction = altsToCollectPredsFrom.minValue();\n        }\n    }\n\n// comes back with reach.uniqueAlt set to a valid alt\n    execATNWithFullContext(dfa, D, // how far we got before failing over\n                                         s0,\n                                         input,\n                                         startIndex,\n                                         outerContext) {\n        if (this.debug || this.trace_atn_sim) {\n            console.log(\"execATNWithFullContext \"+s0);\n        }\n        const fullCtx = true;\n        let foundExactAmbig = false;\n        let reach;\n        let previous = s0;\n        input.seek(startIndex);\n        let t = input.LA(1);\n        let predictedAlt = -1;\n        for (;;) { // while more work\n            reach = this.computeReachSet(previous, t, fullCtx);\n            if (reach===null) {\n                // if any configs in previous dipped into outer context, that\n                // means that input up to t actually finished entry rule\n                // at least for LL decision. Full LL doesn't dip into outer\n                // so don't need special case.\n                // We will get an error no matter what so delay until after\n                // decision; better error message. Also, no reachable target\n                // ATN states in SLL implies LL will also get nowhere.\n                // If conflict in states that dip out, choose min since we\n                // will get error no matter what.\n                const e = this.noViableAlt(input, outerContext, previous, startIndex);\n                input.seek(startIndex);\n                const alt = this.getSynValidOrSemInvalidAltThatFinishedDecisionEntryRule(previous, outerContext);\n                if(alt!==ATN.INVALID_ALT_NUMBER) {\n                    return alt;\n                } else {\n                    throw e;\n                }\n            }\n            const altSubSets = PredictionMode.getConflictingAltSubsets(reach);\n            if(this.debug) {\n                console.log(\"LL altSubSets=\" + altSubSets + \", predict=\" +\n                      PredictionMode.getUniqueAlt(altSubSets) + \", resolvesToJustOneViableAlt=\" +\n                      PredictionMode.resolvesToJustOneViableAlt(altSubSets));\n            }\n            reach.uniqueAlt = this.getUniqueAlt(reach);\n            // unique prediction?\n            if(reach.uniqueAlt!==ATN.INVALID_ALT_NUMBER) {\n                predictedAlt = reach.uniqueAlt;\n                break;\n            } else if (this.predictionMode !== PredictionMode.LL_EXACT_AMBIG_DETECTION) {\n                predictedAlt = PredictionMode.resolvesToJustOneViableAlt(altSubSets);\n                if(predictedAlt !== ATN.INVALID_ALT_NUMBER) {\n                    break;\n                }\n            } else {\n                // In exact ambiguity mode, we never try to terminate early.\n                // Just keeps scarfing until we know what the conflict is\n                if (PredictionMode.allSubsetsConflict(altSubSets) && PredictionMode.allSubsetsEqual(altSubSets)) {\n                    foundExactAmbig = true;\n                    predictedAlt = PredictionMode.getSingleViableAlt(altSubSets);\n                    break;\n                }\n                // else there are multiple non-conflicting subsets or\n                // we're not sure what the ambiguity is yet.\n                // So, keep going.\n            }\n            previous = reach;\n            if( t !== Token.EOF) {\n                input.consume();\n                t = input.LA(1);\n            }\n        }\n        // If the configuration set uniquely predicts an alternative,\n        // without conflict, then we know that it's a full LL decision\n        // not SLL.\n        if (reach.uniqueAlt !== ATN.INVALID_ALT_NUMBER ) {\n            this.reportContextSensitivity(dfa, predictedAlt, reach, startIndex, input.index);\n            return predictedAlt;\n        }\n        // We do not check predicates here because we have checked them\n        // on-the-fly when doing full context prediction.\n\n        //\n        // In non-exact ambiguity detection mode, we might\tactually be able to\n        // detect an exact ambiguity, but I'm not going to spend the cycles\n        // needed to check. We only emit ambiguity warnings in exact ambiguity\n        // mode.\n        //\n        // For example, we might know that we have conflicting configurations.\n        // But, that does not mean that there is no way forward without a\n        // conflict. It's possible to have nonconflicting alt subsets as in:\n\n        // altSubSets=[{1, 2}, {1, 2}, {1}, {1, 2}]\n\n        // from\n        //\n        //    [(17,1,[5 $]), (13,1,[5 10 $]), (21,1,[5 10 $]), (11,1,[$]),\n        //     (13,2,[5 10 $]), (21,2,[5 10 $]), (11,2,[$])]\n        //\n        // In this case, (17,1,[5 $]) indicates there is some next sequence that\n        // would resolve this without conflict to alternative 1. Any other viable\n        // next sequence, however, is associated with a conflict.  We stop\n        // looking for input because no amount of further lookahead will alter\n        // the fact that we should predict alternative 1.  We just can't say for\n        // sure that there is an ambiguity without looking further.\n\n        this.reportAmbiguity(dfa, D, startIndex, input.index, foundExactAmbig, null, reach);\n\n        return predictedAlt;\n    }\n\n    computeReachSet(closure, t, fullCtx) {\n        if (this.debug) {\n            console.log(\"in computeReachSet, starting closure: \" + closure);\n        }\n        if( this.mergeCache===null) {\n            this.mergeCache = new DoubleDict();\n        }\n        const intermediate = new ATNConfigSet(fullCtx);\n\n        // Configurations already in a rule stop state indicate reaching the end\n        // of the decision rule (local context) or end of the start rule (full\n        // context). Once reached, these configurations are never updated by a\n        // closure operation, so they are handled separately for the performance\n        // advantage of having a smaller intermediate set when calling closure.\n        //\n        // For full-context reach operations, separate handling is required to\n        // ensure that the alternative matching the longest overall sequence is\n        // chosen when multiple such configurations can match the input.\n\n        let skippedStopStates = null;\n\n        // First figure out where we can reach on input t\n        for (let i=0; i<closure.items.length;i++) {\n            const c = closure.items[i];\n            if(this.debug) {\n                console.log(\"testing \" + this.getTokenName(t) + \" at \" + c);\n            }\n            if (c.state instanceof RuleStopState) {\n                if (fullCtx || t === Token.EOF) {\n                    if (skippedStopStates===null) {\n                        skippedStopStates = [];\n                    }\n                    skippedStopStates.push(c);\n                    if(this.debug_add) {\n                        console.log(\"added \" + c + \" to skippedStopStates\");\n                    }\n                }\n                continue;\n            }\n            for(let j=0;j<c.state.transitions.length;j++) {\n                const trans = c.state.transitions[j];\n                const target = this.getReachableTarget(trans, t);\n                if (target!==null) {\n                    const cfg = new ATNConfig({state:target}, c);\n                    intermediate.add(cfg, this.mergeCache);\n                    if(this.debug_add) {\n                        console.log(\"added \" + cfg + \" to intermediate\");\n                    }\n                }\n            }\n        }\n        // Now figure out where the reach operation can take us...\n        let reach = null;\n\n        // This block optimizes the reach operation for intermediate sets which\n        // trivially indicate a termination state for the overall\n        // adaptivePredict operation.\n        //\n        // The conditions assume that intermediate\n        // contains all configurations relevant to the reach set, but this\n        // condition is not true when one or more configurations have been\n        // withheld in skippedStopStates, or when the current symbol is EOF.\n        //\n        if (skippedStopStates===null && t!==Token.EOF) {\n            if (intermediate.items.length===1) {\n                // Don't pursue the closure if there is just one state.\n                // It can only have one alternative; just add to result\n                // Also don't pursue the closure if there is unique alternative\n                // among the configurations.\n                reach = intermediate;\n            } else if (this.getUniqueAlt(intermediate)!==ATN.INVALID_ALT_NUMBER) {\n                // Also don't pursue the closure if there is unique alternative\n                // among the configurations.\n                reach = intermediate;\n            }\n        }\n        // If the reach set could not be trivially determined, perform a closure\n        // operation on the intermediate set to compute its initial value.\n        //\n        if (reach===null) {\n            reach = new ATNConfigSet(fullCtx);\n            const closureBusy = new HashSet();\n            const treatEofAsEpsilon = t === Token.EOF;\n            for (let k=0; k<intermediate.items.length;k++) {\n                this.closure(intermediate.items[k], reach, closureBusy, false, fullCtx, treatEofAsEpsilon);\n            }\n        }\n        if (t === Token.EOF) {\n            // After consuming EOF no additional input is possible, so we are\n            // only interested in configurations which reached the end of the\n            // decision rule (local context) or end of the start rule (full\n            // context). Update reach to contain only these configurations. This\n            // handles both explicit EOF transitions in the grammar and implicit\n            // EOF transitions following the end of the decision or start rule.\n            //\n            // When reach==intermediate, no closure operation was performed. In\n            // this case, removeAllConfigsNotInRuleStopState needs to check for\n            // reachable rule stop states as well as configurations already in\n            // a rule stop state.\n            //\n            // This is handled before the configurations in skippedStopStates,\n            // because any configurations potentially added from that list are\n            // already guaranteed to meet this condition whether or not it's\n            // required.\n            //\n            reach = this.removeAllConfigsNotInRuleStopState(reach, reach === intermediate);\n        }\n        // If skippedStopStates!==null, then it contains at least one\n        // configuration. For full-context reach operations, these\n        // configurations reached the end of the start rule, in which case we\n        // only add them back to reach if no configuration during the current\n        // closure operation reached such a state. This ensures adaptivePredict\n        // chooses an alternative matching the longest overall sequence when\n        // multiple alternatives are viable.\n        //\n        if (skippedStopStates!==null && ( (! fullCtx) || (! PredictionMode.hasConfigInRuleStopState(reach)))) {\n            for (let l=0; l<skippedStopStates.length;l++) {\n                reach.add(skippedStopStates[l], this.mergeCache);\n            }\n        }\n\n        if ( this.trace_atn_sim ) {\n            console.log(\"computeReachSet \"+closure+\" -> \"+reach);\n        }\n\n        if (reach.items.length===0) {\n            return null;\n        } else {\n            return reach;\n        }\n    }\n\n    /**\n     * Return a configuration set containing only the configurations from\n     * {@code configs} which are in a {@link RuleStopState}. If all\n     * configurations in {@code configs} are already in a rule stop state, this\n     * method simply returns {@code configs}.\n     *\n     * <p>When {@code lookToEndOfRule} is true, this method uses\n     * {@link ATN//nextTokens} for each configuration in {@code configs} which is\n     * not already in a rule stop state to see if a rule stop state is reachable\n     * from the configuration via epsilon-only transitions.</p>\n     *\n     * @param configs the configuration set to update\n     * @param lookToEndOfRule when true, this method checks for rule stop states\n     * reachable by epsilon-only transitions from each configuration in\n     * {@code configs}.\n     *\n     * @return {@code configs} if all configurations in {@code configs} are in a\n     * rule stop state, otherwise return a new configuration set containing only\n     * the configurations from {@code configs} which are in a rule stop state\n     */\n    removeAllConfigsNotInRuleStopState(configs, lookToEndOfRule) {\n        if (PredictionMode.allConfigsInRuleStopStates(configs)) {\n            return configs;\n        }\n        const result = new ATNConfigSet(configs.fullCtx);\n        for(let i=0; i<configs.items.length;i++) {\n            const config = configs.items[i];\n            if (config.state instanceof RuleStopState) {\n                result.add(config, this.mergeCache);\n                continue;\n            }\n            if (lookToEndOfRule && config.state.epsilonOnlyTransitions) {\n                const nextTokens = this.atn.nextTokens(config.state);\n                if (nextTokens.contains(Token.EPSILON)) {\n                    const endOfRuleState = this.atn.ruleToStopState[config.state.ruleIndex];\n                    result.add(new ATNConfig({state:endOfRuleState}, config), this.mergeCache);\n                }\n            }\n        }\n        return result;\n    }\n\n    computeStartState(p, ctx, fullCtx) {\n        // always at least the implicit call to start rule\n        const initialContext = predictionContextFromRuleContext(this.atn, ctx);\n        const configs = new ATNConfigSet(fullCtx);\n\n        if ( this.trace_atn_sim ) {\n            console.log(\"computeStartState from ATN state \" + p + \" initialContext=\" + initialContext.toString(this.parser));\n        }\n\n        for(let i=0;i<p.transitions.length;i++) {\n            const target = p.transitions[i].target;\n            const c = new ATNConfig({ state:target, alt:i+1, context:initialContext }, null);\n            const closureBusy = new HashSet();\n            this.closure(c, configs, closureBusy, true, fullCtx, false);\n        }\n        return configs;\n    }\n\n    /**\n     * This method transforms the start state computed by\n     * {@link //computeStartState} to the special start state used by a\n     * precedence DFA for a particular precedence value. The transformation\n     * process applies the following changes to the start state's configuration\n     * set.\n     *\n     * <ol>\n     * <li>Evaluate the precedence predicates for each configuration using\n     * {@link SemanticContext//evalPrecedence}.</li>\n     * <li>Remove all configurations which predict an alternative greater than\n     * 1, for which another configuration that predicts alternative 1 is in the\n     * same ATN state with the same prediction context. This transformation is\n     * valid for the following reasons:\n     * <ul>\n     * <li>The closure block cannot contain any epsilon transitions which bypass\n     * the body of the closure, so all states reachable via alternative 1 are\n     * part of the precedence alternatives of the transformed left-recursive\n     * rule.</li>\n     * <li>The \"primary\" portion of a left recursive rule cannot contain an\n     * epsilon transition, so the only way an alternative other than 1 can exist\n     * in a state that is also reachable via alternative 1 is by nesting calls\n     * to the left-recursive rule, with the outer calls not being at the\n     * preferred precedence level.</li>\n     * </ul>\n     * </li>\n     * </ol>\n     *\n     * <p>\n     * The prediction context must be considered by this filter to address\n     * situations like the following.\n     * </p>\n     * <code>\n     * <pre>\n     * grammar TA;\n     * prog: statement* EOF;\n     * statement: letterA | statement letterA 'b' ;\n     * letterA: 'a';\n     * </pre>\n     * </code>\n     * <p>\n     * If the above grammar, the ATN state immediately before the token\n     * reference {@code 'a'} in {@code letterA} is reachable from the left edge\n     * of both the primary and closure blocks of the left-recursive rule\n     * {@code statement}. The prediction context associated with each of these\n     * configurations distinguishes between them, and prevents the alternative\n     * which stepped out to {@code prog} (and then back in to {@code statement}\n     * from being eliminated by the filter.\n     * </p>\n     *\n     * @param configs The configuration set computed by\n     * {@link //computeStartState} as the start state for the DFA.\n     * @return The transformed configuration set representing the start state\n     * for a precedence DFA at a particular precedence level (determined by\n     * calling {@link Parser//getPrecedence})\n     */\n    applyPrecedenceFilter(configs) {\n        let config;\n        const statesFromAlt1 = [];\n        const configSet = new ATNConfigSet(configs.fullCtx);\n        for(let i=0; i<configs.items.length; i++) {\n            config = configs.items[i];\n            // handle alt 1 first\n            if (config.alt !== 1) {\n                continue;\n            }\n            const updatedContext = config.semanticContext.evalPrecedence(this.parser, this._outerContext);\n            if (updatedContext===null) {\n                // the configuration was eliminated\n                continue;\n            }\n            statesFromAlt1[config.state.stateNumber] = config.context;\n            if (updatedContext !== config.semanticContext) {\n                configSet.add(new ATNConfig({semanticContext:updatedContext}, config), this.mergeCache);\n            } else {\n                configSet.add(config, this.mergeCache);\n            }\n        }\n        for(let i=0; i<configs.items.length; i++) {\n            config = configs.items[i];\n            if (config.alt === 1) {\n                // already handled\n                continue;\n            }\n            // In the future, this elimination step could be updated to also\n            // filter the prediction context for alternatives predicting alt>1\n            // (basically a graph subtraction algorithm).\n            if (!config.precedenceFilterSuppressed) {\n                const context = statesFromAlt1[config.state.stateNumber] || null;\n                if (context!==null && context.equals(config.context)) {\n                    // eliminated\n                    continue;\n                }\n            }\n            configSet.add(config, this.mergeCache);\n        }\n        return configSet;\n    }\n\n    getReachableTarget(trans, ttype) {\n        if (trans.matches(ttype, 0, this.atn.maxTokenType)) {\n            return trans.target;\n        } else {\n            return null;\n        }\n    }\n\n    getPredsForAmbigAlts(ambigAlts, configs, nalts) {\n        // REACH=[1|1|[]|0:0, 1|2|[]|0:1]\n        // altToPred starts as an array of all null contexts. The entry at index i\n        // corresponds to alternative i. altToPred[i] may have one of three values:\n        //   1. null: no ATNConfig c is found such that c.alt==i\n        //   2. SemanticContext.NONE: At least one ATNConfig c exists such that\n        //      c.alt==i and c.semanticContext==SemanticContext.NONE. In other words,\n        //      alt i has at least one unpredicated config.\n        //   3. Non-NONE Semantic Context: There exists at least one, and for all\n        //      ATNConfig c such that c.alt==i, c.semanticContext!=SemanticContext.NONE.\n        //\n        // From this, it is clear that NONE||anything==NONE.\n        //\n        let altToPred = [];\n        for(let i=0;i<configs.items.length;i++) {\n            const c = configs.items[i];\n            if(ambigAlts.has( c.alt )) {\n                altToPred[c.alt] = SemanticContext.orContext(altToPred[c.alt] || null, c.semanticContext);\n            }\n        }\n        let nPredAlts = 0;\n        for (let i =1;i< nalts+1;i++) {\n            const pred = altToPred[i] || null;\n            if (pred===null) {\n                altToPred[i] = SemanticContext.NONE;\n            } else if (pred !== SemanticContext.NONE) {\n                nPredAlts += 1;\n            }\n        }\n        // nonambig alts are null in altToPred\n        if (nPredAlts===0) {\n            altToPred = null;\n        }\n        if (this.debug) {\n            console.log(\"getPredsForAmbigAlts result \" + arrayToString(altToPred));\n        }\n        return altToPred;\n    }\n\n    getPredicatePredictions(ambigAlts, altToPred) {\n        const pairs = [];\n        let containsPredicate = false;\n        for (let i=1; i<altToPred.length;i++) {\n            const pred = altToPred[i];\n            // unpredicated is indicated by SemanticContext.NONE\n            if( ambigAlts!==null && ambigAlts.has( i )) {\n                pairs.push(new PredPrediction(pred, i));\n            }\n            if (pred !== SemanticContext.NONE) {\n                containsPredicate = true;\n            }\n        }\n        if (! containsPredicate) {\n            return null;\n        }\n        return pairs;\n    }\n\n    /**\n     * This method is used to improve the localization of error messages by\n     * choosing an alternative rather than throwing a\n     * {@link NoViableAltException} in particular prediction scenarios where the\n     * {@link //ERROR} state was reached during ATN simulation.\n     *\n     * <p>\n     * The default implementation of this method uses the following\n     * algorithm to identify an ATN configuration which successfully parsed the\n     * decision entry rule. Choosing such an alternative ensures that the\n     * {@link ParserRuleContext} returned by the calling rule will be complete\n     * and valid, and the syntax error will be reported later at a more\n     * localized location.</p>\n     *\n     * <ul>\n     * <li>If a syntactically valid path or paths reach the end of the decision rule and\n     * they are semantically valid if predicated, return the min associated alt.</li>\n     * <li>Else, if a semantically invalid but syntactically valid path exist\n     * or paths exist, return the minimum associated alt.\n     * </li>\n     * <li>Otherwise, return {@link ATN//INVALID_ALT_NUMBER}.</li>\n     * </ul>\n     *\n     * <p>\n     * In some scenarios, the algorithm described above could predict an\n     * alternative which will result in a {@link FailedPredicateException} in\n     * the parser. Specifically, this could occur if the <em>only</em> configuration\n     * capable of successfully parsing to the end of the decision rule is\n     * blocked by a semantic predicate. By choosing this alternative within\n     * {@link //adaptivePredict} instead of throwing a\n     * {@link NoViableAltException}, the resulting\n     * {@link FailedPredicateException} in the parser will identify the specific\n     * predicate which is preventing the parser from successfully parsing the\n     * decision rule, which helps developers identify and correct logic errors\n     * in semantic predicates.\n     * </p>\n     *\n     * @param configs The ATN configurations which were valid immediately before\n     * the {@link //ERROR} state was reached\n     * @param outerContext The is the \\gamma_0 initial parser context from the paper\n     * or the parser stack at the instant before prediction commences.\n     *\n     * @return The value to return from {@link //adaptivePredict}, or\n     * {@link ATN//INVALID_ALT_NUMBER} if a suitable alternative was not\n     * identified and {@link //adaptivePredict} should report an error instead\n     */\n    getSynValidOrSemInvalidAltThatFinishedDecisionEntryRule(configs, outerContext) {\n        const cfgs = this.splitAccordingToSemanticValidity(configs, outerContext);\n        const semValidConfigs = cfgs[0];\n        const semInvalidConfigs = cfgs[1];\n        let alt = this.getAltThatFinishedDecisionEntryRule(semValidConfigs);\n        if (alt!==ATN.INVALID_ALT_NUMBER) { // semantically/syntactically viable path exists\n            return alt;\n        }\n        // Is there a syntactically valid path with a failed pred?\n        if (semInvalidConfigs.items.length>0) {\n            alt = this.getAltThatFinishedDecisionEntryRule(semInvalidConfigs);\n            if (alt!==ATN.INVALID_ALT_NUMBER) { // syntactically viable path exists\n                return alt;\n            }\n        }\n        return ATN.INVALID_ALT_NUMBER;\n    }\n\n    getAltThatFinishedDecisionEntryRule(configs) {\n        const alts = [];\n        for(let i=0;i<configs.items.length; i++) {\n            const c = configs.items[i];\n            if (c.reachesIntoOuterContext>0 || ((c.state instanceof RuleStopState) && c.context.hasEmptyPath())) {\n                if(alts.indexOf(c.alt)<0) {\n                    alts.push(c.alt);\n                }\n            }\n        }\n        if (alts.length===0) {\n            return ATN.INVALID_ALT_NUMBER;\n        } else {\n            return Math.min.apply(null, alts);\n        }\n    }\n\n    /**\n     * Walk the list of configurations and split them according to\n     * those that have preds evaluating to true/false.  If no pred, assume\n     * true pred and include in succeeded set.  Returns Pair of sets.\n     *\n     * Create a new set so as not to alter the incoming parameter.\n     *\n     * Assumption: the input stream has been restored to the starting point\n     * prediction, which is where predicates need to evaluate.*/\n    splitAccordingToSemanticValidity( configs, outerContext) {\n        const succeeded = new ATNConfigSet(configs.fullCtx);\n        const failed = new ATNConfigSet(configs.fullCtx);\n        for(let i=0;i<configs.items.length; i++) {\n            const c = configs.items[i];\n            if (c.semanticContext !== SemanticContext.NONE) {\n                const predicateEvaluationResult = c.semanticContext.evaluate(this.parser, outerContext);\n                if (predicateEvaluationResult) {\n                    succeeded.add(c);\n                } else {\n                    failed.add(c);\n                }\n            } else {\n                succeeded.add(c);\n            }\n        }\n        return [succeeded, failed];\n    }\n\n    /**\n     * Look through a list of predicate/alt pairs, returning alts for the\n     * pairs that win. A {@code NONE} predicate indicates an alt containing an\n     * unpredicated config which behaves as \"always true.\" If !complete\n     * then we stop at the first predicate that evaluates to true. This\n     * includes pairs with null predicates.\n     */\n    evalSemanticContext(predPredictions, outerContext, complete) {\n        const predictions = new BitSet();\n        for(let i=0;i<predPredictions.length;i++) {\n            const pair = predPredictions[i];\n            if (pair.pred === SemanticContext.NONE) {\n                predictions.add(pair.alt);\n                if (! complete) {\n                    break;\n                }\n                continue;\n            }\n            const predicateEvaluationResult = pair.pred.evaluate(this.parser, outerContext);\n            if (this.debug || this.dfa_debug) {\n                console.log(\"eval pred \" + pair + \"=\" + predicateEvaluationResult);\n            }\n            if (predicateEvaluationResult) {\n                if (this.debug || this.dfa_debug) {\n                    console.log(\"PREDICT \" + pair.alt);\n                }\n                predictions.add(pair.alt);\n                if (! complete) {\n                    break;\n                }\n            }\n        }\n        return predictions;\n    }\n\n// TODO: If we are doing predicates, there is no point in pursuing\n//     closure operations if we reach a DFA state that uniquely predicts\n//     alternative. We will not be caching that DFA state and it is a\n//     waste to pursue the closure. Might have to advance when we do\n//     ambig detection thought :(\n//\n    closure(config, configs, closureBusy, collectPredicates, fullCtx, treatEofAsEpsilon) {\n        const initialDepth = 0;\n        this.closureCheckingStopState(config, configs, closureBusy, collectPredicates,\n                                 fullCtx, initialDepth, treatEofAsEpsilon);\n    }\n\n    closureCheckingStopState(config, configs, closureBusy, collectPredicates, fullCtx, depth, treatEofAsEpsilon) {\n        if (this.trace_atn_sim || this.debug_closure) {\n            console.log(\"closure(\" + config.toString(this.parser,true) + \")\");\n        }\n        if (config.state instanceof RuleStopState) {\n            // We hit rule end. If we have context info, use it\n            // run thru all possible stack tops in ctx\n            if (! config.context.isEmpty()) {\n                for (let i =0; i<config.context.length; i++) {\n                    if (config.context.getReturnState(i) === PredictionContext.EMPTY_RETURN_STATE) {\n                        if (fullCtx) {\n                            configs.add(new ATNConfig({state:config.state, context:PredictionContext.EMPTY}, config), this.mergeCache);\n                            continue;\n                        } else {\n                            // we have no context info, just chase follow links (if greedy)\n                            if (this.debug) {\n                                console.log(\"FALLING off rule \" + this.getRuleName(config.state.ruleIndex));\n                            }\n                            this.closure_(config, configs, closureBusy, collectPredicates,\n                                     fullCtx, depth, treatEofAsEpsilon);\n                        }\n                        continue;\n                    }\n                    const returnState = this.atn.states[config.context.getReturnState(i)];\n                    const newContext = config.context.getParent(i); // \"pop\" return state\n                    const parms = {state:returnState, alt:config.alt, context:newContext, semanticContext:config.semanticContext};\n                    const c = new ATNConfig(parms, null);\n                    // While we have context to pop back from, we may have\n                    // gotten that context AFTER having falling off a rule.\n                    // Make sure we track that we are now out of context.\n                    c.reachesIntoOuterContext = config.reachesIntoOuterContext;\n                    this.closureCheckingStopState(c, configs, closureBusy, collectPredicates, fullCtx, depth - 1, treatEofAsEpsilon);\n                }\n                return;\n            } else if( fullCtx) {\n                // reached end of start rule\n                configs.add(config, this.mergeCache);\n                return;\n            } else {\n                // else if we have no context info, just chase follow links (if greedy)\n                if (this.debug) {\n                    console.log(\"FALLING off rule \" + this.getRuleName(config.state.ruleIndex));\n                }\n            }\n        }\n        this.closure_(config, configs, closureBusy, collectPredicates, fullCtx, depth, treatEofAsEpsilon);\n    }\n\n    // Do the actual work of walking epsilon edges//\n    closure_(config, configs, closureBusy, collectPredicates, fullCtx, depth, treatEofAsEpsilon) {\n        const p = config.state;\n        // optimization\n        if (! p.epsilonOnlyTransitions) {\n            configs.add(config, this.mergeCache);\n            // make sure to not return here, because EOF transitions can act as\n            // both epsilon transitions and non-epsilon transitions.\n        }\n        for(let i = 0;i<p.transitions.length; i++) {\n            if(i === 0 && this.canDropLoopEntryEdgeInLeftRecursiveRule(config))\n                continue;\n\n            const t = p.transitions[i];\n            const continueCollecting = collectPredicates && !(t instanceof ActionTransition);\n            const c = this.getEpsilonTarget(config, t, continueCollecting, depth === 0, fullCtx, treatEofAsEpsilon);\n            if (c!==null) {\n                let newDepth = depth;\n                if ( config.state instanceof RuleStopState) {\n                    // target fell off end of rule; mark resulting c as having dipped into outer context\n                    // We can't get here if incoming config was rule stop and we had context\n                    // track how far we dip into outer context.  Might\n                    // come in handy and we avoid evaluating context dependent\n                    // preds if this is > 0.\n                    if (this._dfa !== null && this._dfa.precedenceDfa) {\n                        if (t.outermostPrecedenceReturn === this._dfa.atnStartState.ruleIndex) {\n                            c.precedenceFilterSuppressed = true;\n                        }\n                    }\n\n                    c.reachesIntoOuterContext += 1;\n                    if (closureBusy.add(c)!==c) {\n                        // avoid infinite recursion for right-recursive rules\n                        continue;\n                    }\n                    configs.dipsIntoOuterContext = true; // TODO: can remove? only care when we add to set per middle of this method\n                    newDepth -= 1;\n                    if (this.debug) {\n                        console.log(\"dips into outer ctx: \" + c);\n                    }\n                } else {\n                    if (!t.isEpsilon && closureBusy.add(c)!==c){\n                        // avoid infinite recursion for EOF* and EOF+\n                        continue;\n                    }\n                    if (t instanceof RuleTransition) {\n                        // latch when newDepth goes negative - once we step out of the entry context we can't return\n                        if (newDepth >= 0) {\n                            newDepth += 1;\n                        }\n                    }\n                }\n                this.closureCheckingStopState(c, configs, closureBusy, continueCollecting, fullCtx, newDepth, treatEofAsEpsilon);\n            }\n        }\n    }\n\n    canDropLoopEntryEdgeInLeftRecursiveRule(config) {\n        // return False\n        const p = config.state;\n        // First check to see if we are in StarLoopEntryState generated during\n        // left-recursion elimination. For efficiency, also check if\n        // the context has an empty stack case. If so, it would mean\n        // global FOLLOW so we can't perform optimization\n        // Are we the special loop entry/exit state? or SLL wildcard\n        if(p.stateType !== ATNState.STAR_LOOP_ENTRY)\n            return false;\n        if(p.stateType !== ATNState.STAR_LOOP_ENTRY || !p.isPrecedenceDecision ||\n               config.context.isEmpty() || config.context.hasEmptyPath())\n            return false;\n\n        // Require all return states to return back to the same rule that p is in.\n        const numCtxs = config.context.length;\n        for(let i=0; i<numCtxs; i++) { // for each stack context\n            const returnState = this.atn.states[config.context.getReturnState(i)];\n            if (returnState.ruleIndex !== p.ruleIndex)\n                return false;\n        }\n\n        const decisionStartState = p.transitions[0].target;\n        const blockEndStateNum = decisionStartState.endState.stateNumber;\n        const blockEndState = this.atn.states[blockEndStateNum];\n\n        // Verify that the top of each stack context leads to loop entry/exit\n        // state through epsilon edges and w/o leaving rule.\n        for(let i=0; i<numCtxs; i++) { // for each stack context\n            const returnStateNumber = config.context.getReturnState(i);\n            const returnState = this.atn.states[returnStateNumber];\n            // all states must have single outgoing epsilon edge\n            if (returnState.transitions.length !== 1 || !returnState.transitions[0].isEpsilon)\n                return false;\n\n            // Look for prefix op case like 'not expr', (' type ')' expr\n            const returnStateTarget = returnState.transitions[0].target;\n            if ( returnState.stateType === ATNState.BLOCK_END && returnStateTarget === p )\n                continue;\n\n            // Look for 'expr op expr' or case where expr's return state is block end\n            // of (...)* internal block; the block end points to loop back\n            // which points to p but we don't need to check that\n            if ( returnState === blockEndState )\n                continue;\n\n            // Look for ternary expr ? expr : expr. The return state points at block end,\n            // which points at loop entry state\n            if ( returnStateTarget === blockEndState )\n                continue;\n\n            // Look for complex prefix 'between expr and expr' case where 2nd expr's\n            // return state points at block end state of (...)* internal block\n            if (returnStateTarget.stateType === ATNState.BLOCK_END && returnStateTarget.transitions.length === 1\n                    && returnStateTarget.transitions[0].isEpsilon && returnStateTarget.transitions[0].target === p)\n                continue;\n\n            // anything else ain't conforming\n            return false;\n        }\n        return true;\n    }\n\n    getRuleName(index) {\n        if (this.parser!==null && index>=0) {\n            return this.parser.ruleNames[index];\n        } else {\n            return \"<rule \" + index + \">\";\n        }\n    }\n\n    getEpsilonTarget(config, t, collectPredicates, inContext, fullCtx, treatEofAsEpsilon) {\n        switch(t.serializationType) {\n        case Transition.RULE:\n            return this.ruleTransition(config, t);\n        case Transition.PRECEDENCE:\n            return this.precedenceTransition(config, t, collectPredicates, inContext, fullCtx);\n        case Transition.PREDICATE:\n            return this.predTransition(config, t, collectPredicates, inContext, fullCtx);\n        case Transition.ACTION:\n            return this.actionTransition(config, t);\n        case Transition.EPSILON:\n            return new ATNConfig({state:t.target}, config);\n        case Transition.ATOM:\n        case Transition.RANGE:\n        case Transition.SET:\n            // EOF transitions act like epsilon transitions after the first EOF\n            // transition is traversed\n            if (treatEofAsEpsilon) {\n                if (t.matches(Token.EOF, 0, 1)) {\n                    return new ATNConfig({state: t.target}, config);\n                }\n            }\n            return null;\n        default:\n            return null;\n        }\n    }\n\n    actionTransition(config, t) {\n        if (this.debug) {\n            const index = t.actionIndex === -1 ? 65535 : t.actionIndex;\n            console.log(\"ACTION edge \" + t.ruleIndex + \":\" + index);\n        }\n        return new ATNConfig({state:t.target}, config);\n    }\n\n    precedenceTransition(config, pt, collectPredicates, inContext, fullCtx) {\n        if (this.debug) {\n            console.log(\"PRED (collectPredicates=\" + collectPredicates + \") \" +\n                    pt.precedence + \">=_p, ctx dependent=true\");\n            if (this.parser!==null) {\n                console.log(\"context surrounding pred is \" + arrayToString(this.parser.getRuleInvocationStack()));\n            }\n        }\n        let c = null;\n        if (collectPredicates && inContext) {\n            if (fullCtx) {\n                // In full context mode, we can evaluate predicates on-the-fly\n                // during closure, which dramatically reduces the size of\n                // the config sets. It also obviates the need to test predicates\n                // later during conflict resolution.\n                const currentPosition = this._input.index;\n                this._input.seek(this._startIndex);\n                const predSucceeds = pt.getPredicate().evaluate(this.parser, this._outerContext);\n                this._input.seek(currentPosition);\n                if (predSucceeds) {\n                    c = new ATNConfig({state:pt.target}, config); // no pred context\n                }\n            } else {\n                const newSemCtx = SemanticContext.andContext(config.semanticContext, pt.getPredicate());\n                c = new ATNConfig({state:pt.target, semanticContext:newSemCtx}, config);\n            }\n        } else {\n            c = new ATNConfig({state:pt.target}, config);\n        }\n        if (this.debug) {\n            console.log(\"config from pred transition=\" + c);\n        }\n        return c;\n    }\n\n    predTransition(config, pt, collectPredicates, inContext, fullCtx) {\n        if (this.debug) {\n            console.log(\"PRED (collectPredicates=\" + collectPredicates + \") \" + pt.ruleIndex +\n                    \":\" + pt.predIndex + \", ctx dependent=\" + pt.isCtxDependent);\n            if (this.parser!==null) {\n                console.log(\"context surrounding pred is \" + arrayToString(this.parser.getRuleInvocationStack()));\n            }\n        }\n        let c = null;\n        if (collectPredicates && ((pt.isCtxDependent && inContext) || ! pt.isCtxDependent)) {\n            if (fullCtx) {\n                // In full context mode, we can evaluate predicates on-the-fly\n                // during closure, which dramatically reduces the size of\n                // the config sets. It also obviates the need to test predicates\n                // later during conflict resolution.\n                const currentPosition = this._input.index;\n                this._input.seek(this._startIndex);\n                const predSucceeds = pt.getPredicate().evaluate(this.parser, this._outerContext);\n                this._input.seek(currentPosition);\n                if (predSucceeds) {\n                    c = new ATNConfig({state:pt.target}, config); // no pred context\n                }\n            } else {\n                const newSemCtx = SemanticContext.andContext(config.semanticContext, pt.getPredicate());\n                c = new ATNConfig({state:pt.target, semanticContext:newSemCtx}, config);\n            }\n        } else {\n            c = new ATNConfig({state:pt.target}, config);\n        }\n        if (this.debug) {\n            console.log(\"config from pred transition=\" + c);\n        }\n        return c;\n    }\n\n    ruleTransition(config, t) {\n        if (this.debug) {\n            console.log(\"CALL rule \" + this.getRuleName(t.target.ruleIndex) + \", ctx=\" + config.context);\n        }\n        const returnState = t.followState;\n        const newContext = SingletonPredictionContext.create(config.context, returnState.stateNumber);\n        return new ATNConfig({state:t.target, context:newContext}, config );\n    }\n\n    getConflictingAlts(configs) {\n        const altsets = PredictionMode.getConflictingAltSubsets(configs);\n        return PredictionMode.getAlts(altsets);\n    }\n\n    /**\n     * Sam pointed out a problem with the previous definition, v3, of\n     * ambiguous states. If we have another state associated with conflicting\n     * alternatives, we should keep going. For example, the following grammar\n     *\n     * s : (ID | ID ID?) ';' ;\n     *\n     * When the ATN simulation reaches the state before ';', it has a DFA\n     * state that looks like: [12|1|[], 6|2|[], 12|2|[]]. Naturally\n     * 12|1|[] and 12|2|[] conflict, but we cannot stop processing this node\n     * because alternative to has another way to continue, via [6|2|[]].\n     * The key is that we have a single state that has config's only associated\n     * with a single alternative, 2, and crucially the state transitions\n     * among the configurations are all non-epsilon transitions. That means\n     * we don't consider any conflicts that include alternative 2. So, we\n     * ignore the conflict between alts 1 and 2. We ignore a set of\n     * conflicting alts when there is an intersection with an alternative\n     * associated with a single alt state in the state&rarr;config-list map.\n     *\n     * It's also the case that we might have two conflicting configurations but\n     * also a 3rd nonconflicting configuration for a different alternative:\n     * [1|1|[], 1|2|[], 8|3|[]]. This can come about from grammar:\n     *\n     * a : A | A | A B ;\n     *\n     * After matching input A, we reach the stop state for rule A, state 1.\n     * State 8 is the state right before B. Clearly alternatives 1 and 2\n     * conflict and no amount of further lookahead will separate the two.\n     * However, alternative 3 will be able to continue and so we do not\n     * stop working on this state. In the previous example, we're concerned\n     * with states associated with the conflicting alternatives. Here alt\n     * 3 is not associated with the conflicting configs, but since we can continue\n     * looking for input reasonably, I don't declare the state done. We\n     * ignore a set of conflicting alts when we have an alternative\n     * that we still need to pursue\n     */\n    getConflictingAltsOrUniqueAlt(configs) {\n        let conflictingAlts = null;\n        if (configs.uniqueAlt!== ATN.INVALID_ALT_NUMBER) {\n            conflictingAlts = new BitSet();\n            conflictingAlts.add(configs.uniqueAlt);\n        } else {\n            conflictingAlts = configs.conflictingAlts;\n        }\n        return conflictingAlts;\n    }\n\n    getTokenName(t) {\n        if (t===Token.EOF) {\n            return \"EOF\";\n        }\n        if( this.parser!==null && this.parser.literalNames!==null) {\n            if (t >= this.parser.literalNames.length && t >= this.parser.symbolicNames.length) {\n                console.log(\"\" + t + \" ttype out of range: \" + this.parser.literalNames);\n                console.log(\"\" + this.parser.getInputStream().getTokens());\n            } else {\n                const name = this.parser.literalNames[t] || this.parser.symbolicNames[t];\n                return name + \"<\" + t + \">\";\n            }\n        }\n        return \"\" + t;\n    }\n\n    getLookaheadName(input) {\n        return this.getTokenName(input.LA(1));\n    }\n\n    /**\n     * Used for debugging in adaptivePredict around execATN but I cut\n     * it out for clarity now that alg. works well. We can leave this\n     * \"dead\" code for a bit\n     */\n    dumpDeadEndConfigs(nvae) {\n        console.log(\"dead end configs: \");\n        const decs = nvae.getDeadEndConfigs();\n        for(let i=0; i<decs.length; i++) {\n            const c = decs[i];\n            let trans = \"no edges\";\n            if (c.state.transitions.length>0) {\n                const t = c.state.transitions[0];\n                if (t instanceof AtomTransition) {\n                    trans = \"Atom \"+ this.getTokenName(t.label);\n                } else if (t instanceof SetTransition) {\n                    const neg = (t instanceof NotSetTransition);\n                    trans = (neg ? \"~\" : \"\") + \"Set \" + t.set;\n                }\n            }\n            console.error(c.toString(this.parser, true) + \":\" + trans);\n        }\n    }\n\n    noViableAlt(input, outerContext, configs, startIndex) {\n        return new NoViableAltException(this.parser, input, input.get(startIndex), input.LT(1), configs, outerContext);\n    }\n\n    getUniqueAlt(configs) {\n        let alt = ATN.INVALID_ALT_NUMBER;\n        for(let i=0;i<configs.items.length;i++) {\n            const c = configs.items[i];\n            if (alt === ATN.INVALID_ALT_NUMBER) {\n                alt = c.alt // found first alt\n            } else if( c.alt!==alt) {\n                return ATN.INVALID_ALT_NUMBER;\n            }\n        }\n        return alt;\n    }\n\n    /**\n     * Add an edge to the DFA, if possible. This method calls\n     * {@link //addDFAState} to ensure the {@code to} state is present in the\n     * DFA. If {@code from} is {@code null}, or if {@code t} is outside the\n     * range of edges that can be represented in the DFA tables, this method\n     * returns without adding the edge to the DFA.\n     *\n     * <p>If {@code to} is {@code null}, this method returns {@code null}.\n     * Otherwise, this method returns the {@link DFAState} returned by calling\n     * {@link //addDFAState} for the {@code to} state.</p>\n     *\n     * @param dfa The DFA\n     * @param from_ The source state for the edge\n     * @param t The input symbol\n     * @param to The target state for the edge\n     *\n     * @return If {@code to} is {@code null}, this method returns {@code null};\n     * otherwise this method returns the result of calling {@link //addDFAState}\n     * on {@code to}\n     */\n    addDFAEdge(dfa, from_, t, to) {\n        if( this.debug) {\n            console.log(\"EDGE \" + from_ + \" -> \" + to + \" upon \" + this.getTokenName(t));\n        }\n        if (to===null) {\n            return null;\n        }\n        to = this.addDFAState(dfa, to); // used existing if possible not incoming\n        if (from_===null || t < -1 || t > this.atn.maxTokenType) {\n            return to;\n        }\n        if (from_.edges===null) {\n            from_.edges = [];\n        }\n        from_.edges[t+1] = to; // connect\n\n        if (this.debug) {\n            const literalNames = this.parser===null ? null : this.parser.literalNames;\n            const symbolicNames = this.parser===null ? null : this.parser.symbolicNames;\n            console.log(\"DFA=\\n\" + dfa.toString(literalNames, symbolicNames));\n        }\n        return to;\n    }\n\n    /**\n     * Add state {@code D} to the DFA if it is not already present, and return\n     * the actual instance stored in the DFA. If a state equivalent to {@code D}\n     * is already in the DFA, the existing state is returned. Otherwise this\n     * method returns {@code D} after adding it to the DFA.\n     *\n     * <p>If {@code D} is {@link //ERROR}, this method returns {@link //ERROR} and\n     * does not change the DFA.</p>\n     *\n     * @param dfa The dfa\n     * @param D The DFA state to add\n     * @return The state stored in the DFA. This will be either the existing\n     * state if {@code D} is already in the DFA, or {@code D} itself if the\n     * state was not already present\n     */\n    addDFAState(dfa, D) {\n        if (D === ATNSimulator.ERROR) {\n            return D;\n        }\n        const existing = dfa.states.get(D);\n        if(existing!==null) {\n            if ( this.trace_atn_sim ) console.log(\"addDFAState \" + D + \" exists\");\n            return existing;\n        }\n        D.stateNumber = dfa.states.length;\n        if (! D.configs.readOnly) {\n            D.configs.optimizeConfigs(this);\n            D.configs.setReadonly(true);\n        }\n\n        if ( this.trace_atn_sim ) console.log(\"addDFAState new \" + D);\n\n        dfa.states.add(D);\n        if (this.debug) {\n            console.log(\"adding new DFA state: \" + D);\n        }\n        return D;\n    }\n\n    reportAttemptingFullContext(dfa, conflictingAlts, configs, startIndex, stopIndex) {\n        if (this.debug || this.retry_debug) {\n            const interval = new Interval(startIndex, stopIndex + 1);\n            console.log(\"reportAttemptingFullContext decision=\" + dfa.decision + \":\" + configs +\n                               \", input=\" + this.parser.getTokenStream().getText(interval));\n        }\n        if (this.parser!==null) {\n            this.parser.getErrorListenerDispatch().reportAttemptingFullContext(this.parser, dfa, startIndex, stopIndex, conflictingAlts, configs);\n        }\n    }\n\n    reportContextSensitivity(dfa, prediction, configs, startIndex, stopIndex) {\n        if (this.debug || this.retry_debug) {\n            const interval = new Interval(startIndex, stopIndex + 1);\n            console.log(\"reportContextSensitivity decision=\" + dfa.decision + \":\" + configs +\n                               \", input=\" + this.parser.getTokenStream().getText(interval));\n        }\n        if (this.parser!==null) {\n            this.parser.getErrorListenerDispatch().reportContextSensitivity(this.parser, dfa, startIndex, stopIndex, prediction, configs);\n        }\n    }\n\n    // If context sensitive parsing, we know it's ambiguity not conflict//\n    reportAmbiguity(dfa, D, startIndex, stopIndex,\n                                   exact, ambigAlts, configs ) {\n        if (this.debug || this.retry_debug) {\n            const interval = new Interval(startIndex, stopIndex + 1);\n            console.log(\"reportAmbiguity \" + ambigAlts + \":\" + configs +\n                               \", input=\" + this.parser.getTokenStream().getText(interval));\n        }\n        if (this.parser!==null) {\n            this.parser.getErrorListenerDispatch().reportAmbiguity(this.parser, dfa, startIndex, stopIndex, exact, ambigAlts, configs);\n        }\n    }\n}\n","/* Copyright (c) 2012-2022 The ANTLR Project Contributors. All rights reserved.\n * Use is of this file is governed by the BSD 3-clause license that\n * can be found in the LICENSE.txt file in the project root.\n */\nimport PredictionContext from \"../context/PredictionContext.js\";\nimport HashMap from \"../misc/HashMap.js\";\n\n/**\n * Used to cache {@link PredictionContext} objects. Its used for the shared\n * context cash associated with contexts in DFA states. This cache\n * can be used for both lexers and parsers.\n */\nexport default class PredictionContextCache {\n\n    constructor() {\n        this.cache = new HashMap();\n    }\n\n    /**\n     * Add a context to the cache and return it. If the context already exists,\n     * return that one instead and do not add a new context to the cache.\n     * Protect shared cache from unsafe thread access.\n     */\n    add(ctx) {\n        if (ctx === PredictionContext.EMPTY) {\n            return PredictionContext.EMPTY;\n        }\n        const existing = this.cache.get(ctx) || null;\n        if (existing !== null) {\n            return existing;\n        }\n        this.cache.set(ctx, ctx);\n        return ctx;\n    }\n\n    get(ctx) {\n        return this.cache.get(ctx) || null;\n    }\n\n    get length(){\n        return this.cache.length;\n    }\n}\n","/* Copyright (c) 2012-2022 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause license that\n * can be found in the LICENSE.txt file in the project root.\n */\n\nimport ATN from './ATN.js';\nimport ATNDeserializer from './ATNDeserializer.js';\nimport LexerATNSimulator from './LexerATNSimulator.js';\nimport ParserATNSimulator from './ParserATNSimulator.js';\nimport PredictionMode from './PredictionMode.js';\nimport PredictionContextCache from './PredictionContextCache.js';\n\nexport default { ATN, ATNDeserializer, LexerATNSimulator, ParserATNSimulator, PredictionMode, PredictionContextCache }\n","/* Copyright (c) 2012-2022 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause license that\n * can be found in the LICENSE.txt file in the project root.\n */\n\n\nimport arrayToString from \"../utils/arrayToString.js\";\n\n/**\n * A DFA walker that knows how to dump them to serialized strings.\n */\nexport default class DFASerializer {\n    constructor(dfa, literalNames, symbolicNames) {\n        this.dfa = dfa;\n        this.literalNames = literalNames || [];\n        this.symbolicNames = symbolicNames || [];\n    }\n\n    toString() {\n       if(this.dfa.s0 === null) {\n           return null;\n       }\n       let buf = \"\";\n       const states = this.dfa.sortedStates();\n       for(let i=0; i<states.length; i++) {\n           const s = states[i];\n           if(s.edges!==null) {\n                const n = s.edges.length;\n                for(let j=0;j<n;j++) {\n                    const t = s.edges[j] || null;\n                    if(t!==null && t.stateNumber !== 0x7FFFFFFF) {\n                        buf = buf.concat(this.getStateString(s));\n                        buf = buf.concat(\"-\");\n                        buf = buf.concat(this.getEdgeLabel(j));\n                        buf = buf.concat(\"->\");\n                        buf = buf.concat(this.getStateString(t));\n                        buf = buf.concat('\\n');\n                    }\n                }\n           }\n       }\n       return buf.length===0 ? null : buf;\n    }\n\n    getEdgeLabel(i) {\n        if (i===0) {\n            return \"EOF\";\n        } else if(this.literalNames !==null || this.symbolicNames!==null) {\n            return this.literalNames[i-1] || this.symbolicNames[i-1];\n        } else {\n            return String.fromCharCode(i-1);\n        }\n    }\n\n    getStateString(s) {\n        const baseStateStr = ( s.isAcceptState ? \":\" : \"\") + \"s\" + s.stateNumber + ( s.requiresFullContext ? \"^\" : \"\");\n        if(s.isAcceptState) {\n            if (s.predicates !== null) {\n                return baseStateStr + \"=>\" + arrayToString(s.predicates);\n            } else {\n                return baseStateStr + \"=>\" + s.prediction.toString();\n            }\n        } else {\n            return baseStateStr;\n        }\n    }\n}\n\n\n","/* Copyright (c) 2012-2022 The ANTLR Project Contributors. All rights reserved.\n * Use is of this file is governed by the BSD 3-clause license that\n * can be found in the LICENSE.txt file in the project root.\n */\nimport DFASerializer from \"./DFASerializer.js\";\n\nexport default class LexerDFASerializer extends DFASerializer {\n    constructor(dfa) {\n        super(dfa, null);\n    }\n\n    getEdgeLabel(i) {\n        return \"'\" + String.fromCharCode(i) + \"'\";\n    }\n}\n","/* Copyright (c) 2012-2022 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause license that\n * can be found in the LICENSE.txt file in the project root.\n */\n\nimport DFAState from './DFAState.js';\nimport StarLoopEntryState from '../state/StarLoopEntryState.js';\nimport ATNConfigSet from './../atn/ATNConfigSet.js';\nimport DFASerializer from './DFASerializer.js';\nimport LexerDFASerializer from './LexerDFASerializer.js';\nimport HashSet from \"../misc/HashSet.js\";\n\nexport default class DFA {\n\tconstructor(atnStartState, decision) {\n\t\tif (decision === undefined) {\n\t\t\tdecision = 0;\n\t\t}\n\t\t/**\n\t\t * From which ATN state did we create this DFA?\n\t\t */\n\t\tthis.atnStartState = atnStartState;\n\t\tthis.decision = decision;\n\t\t/**\n\t\t * A set of all DFA states. Use {@link Map} so we can get old state back\n\t\t * ({@link Set} only allows you to see if it's there).\n\t\t */\n\t\tthis._states = new HashSet();\n\t\tthis.s0 = null;\n\t\t/**\n\t\t * {@code true} if this DFA is for a precedence decision; otherwise,\n\t\t * {@code false}. This is the backing field for {@link //isPrecedenceDfa},\n\t\t * {@link //setPrecedenceDfa}\n\t\t */\n\t\tthis.precedenceDfa = false;\n\t\tif (atnStartState instanceof StarLoopEntryState)\n\t\t{\n\t\t\tif (atnStartState.isPrecedenceDecision) {\n\t\t\t\tthis.precedenceDfa = true;\n\t\t\t\tconst precedenceState = new DFAState(null, new ATNConfigSet());\n\t\t\t\tprecedenceState.edges = [];\n\t\t\t\tprecedenceState.isAcceptState = false;\n\t\t\t\tprecedenceState.requiresFullContext = false;\n\t\t\t\tthis.s0 = precedenceState;\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Get the start state for a specific precedence value.\n\t *\n\t * @param precedence The current precedence.\n\t * @return The start state corresponding to the specified precedence, or\n\t * {@code null} if no start state exists for the specified precedence.\n\t *\n\t * @throws IllegalStateException if this is not a precedence DFA.\n\t * @see //isPrecedenceDfa()\n\t */\n\tgetPrecedenceStartState(precedence) {\n\t\tif (!(this.precedenceDfa)) {\n\t\t\tthrow (\"Only precedence DFAs may contain a precedence start state.\");\n\t\t}\n\t\t// s0.edges is never null for a precedence DFA\n\t\tif (precedence < 0 || precedence >= this.s0.edges.length) {\n\t\t\treturn null;\n\t\t}\n\t\treturn this.s0.edges[precedence] || null;\n\t}\n\n\t/**\n\t * Set the start state for a specific precedence value.\n\t *\n\t * @param precedence The current precedence.\n\t * @param startState The start state corresponding to the specified\n\t * precedence.\n\t *\n\t * @throws IllegalStateException if this is not a precedence DFA.\n\t * @see //isPrecedenceDfa()\n\t */\n\tsetPrecedenceStartState(precedence, startState) {\n\t\tif (!(this.precedenceDfa)) {\n\t\t\tthrow (\"Only precedence DFAs may contain a precedence start state.\");\n\t\t}\n\t\tif (precedence < 0) {\n\t\t\treturn;\n\t\t}\n\n\t\t/**\n\t\t * synchronization on s0 here is ok. when the DFA is turned into a\n\t\t * precedence DFA, s0 will be initialized once and not updated again\n\t\t * s0.edges is never null for a precedence DFA\n\t\t */\n\t\tthis.s0.edges[precedence] = startState;\n\t}\n\n\t/**\n\t * Sets whether this is a precedence DFA. If the specified value differs\n\t * from the current DFA configuration, the following actions are taken;\n\t * otherwise no changes are made to the current DFA.\n\t *\n\t * <ul>\n\t * <li>The {@link //states} map is cleared</li>\n\t * <li>If {@code precedenceDfa} is {@code false}, the initial state\n\t * {@link //s0} is set to {@code null}; otherwise, it is initialized to a new\n\t * {@link DFAState} with an empty outgoing {@link DFAState//edges} array to\n\t * store the start states for individual precedence values.</li>\n\t * <li>The {@link //precedenceDfa} field is updated</li>\n\t * </ul>\n\t *\n\t * @param precedenceDfa {@code true} if this is a precedence DFA; otherwise,\n\t * {@code false}\n\t */\n\tsetPrecedenceDfa(precedenceDfa) {\n\t\tif (this.precedenceDfa!==precedenceDfa) {\n\t\t\tthis._states = new HashSet();\n\t\t\tif (precedenceDfa) {\n\t\t\t\tconst precedenceState = new DFAState(null, new ATNConfigSet());\n\t\t\t\tprecedenceState.edges = [];\n\t\t\t\tprecedenceState.isAcceptState = false;\n\t\t\t\tprecedenceState.requiresFullContext = false;\n\t\t\t\tthis.s0 = precedenceState;\n\t\t\t} else {\n\t\t\t\tthis.s0 = null;\n\t\t\t}\n\t\t\tthis.precedenceDfa = precedenceDfa;\n\t\t}\n\t}\n\n\t/**\n\t * Return a list of all states in this DFA, ordered by state number.\n\t */\n\tsortedStates() {\n\t\tconst list = this._states.values();\n\t\treturn list.sort(function(a, b) {\n\t\t\treturn a.stateNumber - b.stateNumber;\n\t\t});\n\t}\n\n\ttoString(literalNames, symbolicNames) {\n\t\tliteralNames = literalNames || null;\n\t\tsymbolicNames = symbolicNames || null;\n\t\tif (this.s0 === null) {\n\t\t\treturn \"\";\n\t\t}\n\t\tconst serializer = new DFASerializer(this, literalNames, symbolicNames);\n\t\treturn serializer.toString();\n\t}\n\n\ttoLexerString() {\n\t\tif (this.s0 === null) {\n\t\t\treturn \"\";\n\t\t}\n\t\tconst serializer = new LexerDFASerializer(this);\n\t\treturn serializer.toString();\n\t}\n\n\tget states(){\n\t\treturn this._states;\n\t}\n}\n","/* Copyright (c) 2012-2022 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause license that\n * can be found in the LICENSE.txt file in the project root.\n */\n\nimport DFA from './DFA.js';\nimport DFASerializer from './DFASerializer.js';\nimport LexerDFASerializer from './LexerDFASerializer.js';\nimport PredPrediction from './PredPrediction.js';\n\nexport default { DFA, DFASerializer, LexerDFASerializer, PredPrediction };\n","/* Copyright (c) 2012-2022 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause license that\n * can be found in the LICENSE.txt file in the project root.\n */\nimport PredictionContext from './PredictionContext.js';\n\nexport default { PredictionContext }\n","import Interval from './Interval.js';\nimport IntervalSet from './IntervalSet.js';\n\nexport default { Interval, IntervalSet }\n","/* Copyright (c) 2012-2022 The ANTLR Project Contributors. All rights reserved.\n * Use is of this file is governed by the BSD 3-clause license that\n * can be found in the LICENSE.txt file in the project root.\n */\nexport default class ParseTreeListener {\n    visitTerminal(node) {\n    }\n\n    visitErrorNode(node) {\n    }\n\n    enterEveryRule(node) {\n    }\n\n    exitEveryRule(node) {\n    }\n}\n","/* Copyright (c) 2012-2022 The ANTLR Project Contributors. All rights reserved.\n * Use is of this file is governed by the BSD 3-clause license that\n * can be found in the LICENSE.txt file in the project root.\n */\nexport default class ParseTreeVisitor {\n    visit(ctx) {\n        if (Array.isArray(ctx)) {\n            return ctx.map(function(child) {\n                return child.accept(this);\n            }, this);\n        } else {\n            return ctx.accept(this);\n        }\n    }\n\n    visitChildren(ctx) {\n        if (ctx.children) {\n            return this.visit(ctx.children);\n        } else {\n            return null;\n        }\n    }\n\n    visitTerminal(node) {\n    }\n\n    visitErrorNode(node) {\n    }\n}\n\n","/* Copyright (c) 2012-2022 The ANTLR Project Contributors. All rights reserved.\n * Use is of this file is governed by the BSD 3-clause license that\n * can be found in the LICENSE.txt file in the project root.\n */\nimport TerminalNode from \"./TerminalNode.js\";\nimport ErrorNode from \"./ErrorNode.js\";\n\nexport default class ParseTreeWalker {\n\n    /**\n     * Performs a walk on the given parse tree starting at the root and going down recursively\n     * with depth-first search. On each node, {@link ParseTreeWalker//enterRule} is called before\n     * recursively walking down into child nodes, then\n     * {@link ParseTreeWalker//exitRule} is called after the recursive call to wind up.\n     * @param listener The listener used by the walker to process grammar rules\n     * @param t The parse tree to be walked on\n     */\n    walk(listener, t) {\n        const errorNode = t instanceof ErrorNode ||\n            (t.isErrorNode !== undefined && t.isErrorNode());\n        if (errorNode) {\n            listener.visitErrorNode(t);\n        } else if (t instanceof TerminalNode) {\n            listener.visitTerminal(t);\n        } else {\n            this.enterRule(listener, t);\n            for (let i = 0; i < t.getChildCount(); i++) {\n                const child = t.getChild(i);\n                this.walk(listener, child);\n            }\n            this.exitRule(listener, t);\n        }\n    }\n\n    /**\n     * Enters a grammar rule by first triggering the generic event {@link ParseTreeListener//enterEveryRule}\n     * then by triggering the event specific to the given parse tree node\n     * @param listener The listener responding to the trigger events\n     * @param r The grammar rule containing the rule context\n     */\n    enterRule(listener, r) {\n        const ctx = r.ruleContext;\n        listener.enterEveryRule(ctx);\n        ctx.enterRule(listener);\n    }\n\n    /**\n     * Exits a grammar rule by first triggering the event specific to the given parse tree node\n     * then by triggering the generic event {@link ParseTreeListener//exitEveryRule}\n     * @param listener The listener responding to the trigger events\n     * @param r The grammar rule containing the rule context\n     */\n    exitRule(listener, r) {\n        const ctx = r.ruleContext;\n        ctx.exitRule(listener);\n        listener.exitEveryRule(ctx);\n    }\n}\n\nParseTreeWalker.DEFAULT = new ParseTreeWalker();\n","/* Copyright (c) 2012-2022 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause license that\n * can be found in the LICENSE.txt file in the project root.\n */\n\nimport RuleNode from './RuleNode.js';\nimport ErrorNode from './ErrorNode.js';\nimport TerminalNode from './TerminalNode.js';\nimport ParseTreeListener from './ParseTreeListener.js';\nimport ParseTreeVisitor from './ParseTreeVisitor.js';\nimport ParseTreeWalker from './ParseTreeWalker.js';\nimport { default as Trees } from './Trees.js';\n\nexport default { Trees, RuleNode, ErrorNode, TerminalNode, ParseTreeListener, ParseTreeVisitor, ParseTreeWalker }\n","/* Copyright (c) 2012-2022 The ANTLR Project Contributors. All rights reserved.\n * Use is of this file is governed by the BSD 3-clause license that\n * can be found in the LICENSE.txt file in the project root.\n */\nimport RecognitionException from \"./RecognitionException.js\";\n\n/**\n * This signifies any kind of mismatched input exceptions such as\n * when the current input does not match the expected token.\n */\nexport default class InputMismatchException extends RecognitionException {\n    constructor(recognizer) {\n        super({message: \"\", recognizer: recognizer, input: recognizer.getInputStream(), ctx: recognizer._ctx});\n        this.offendingToken = recognizer.getCurrentToken();\n    }\n}\n","/* Copyright (c) 2012-2022 The ANTLR Project Contributors. All rights reserved.\n * Use is of this file is governed by the BSD 3-clause license that\n * can be found in the LICENSE.txt file in the project root.\n */\nimport PredicateTransition from \"../transition/PredicateTransition.js\";\nimport RecognitionException from \"./RecognitionException.js\";\n\n/**\n * A semantic predicate failed during validation. Validation of predicates\n * occurs when normally parsing the alternative just like matching a token.\n * Disambiguating predicate evaluation occurs when we test a predicate during\n * prediction.\n */\nexport default class FailedPredicateException extends RecognitionException {\n\n    constructor(recognizer, predicate, message) {\n        super({\n            message: formatMessage(predicate, message || null),\n            recognizer: recognizer,\n            input: recognizer.getInputStream(), ctx: recognizer._ctx\n        });\n        const s = recognizer._interp.atn.states[recognizer.state]\n        const trans = s.transitions[0]\n        if (trans instanceof PredicateTransition) {\n            this.ruleIndex = trans.ruleIndex;\n            this.predicateIndex = trans.predIndex;\n        } else {\n            this.ruleIndex = 0;\n            this.predicateIndex = 0;\n        }\n        this.predicate = predicate;\n        this.offendingToken = recognizer.getCurrentToken();\n    }\n}\n\n\nfunction formatMessage(predicate, message) {\n    if (message !==null) {\n        return message;\n    } else {\n        return \"failed predicate: {\" + predicate + \"}?\";\n    }\n}\n","/* Copyright (c) 2012-2022 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause license that\n * can be found in the LICENSE.txt file in the project root.\n */\n\nimport ErrorListener from './ErrorListener.js';\nimport Interval from '../misc/Interval.js';\nimport BitSet from \"../misc/BitSet.js\";\n\n\n/**\n * This implementation of {@link ANTLRErrorListener} can be used to identify\n *  certain potential correctness and performance problems in grammars. \"Reports\"\n *  are made by calling {@link Parser//notifyErrorListeners} with the appropriate\n *  message.\n *\n *  <ul>\n *  <li><b>Ambiguities</b>: These are cases where more than one path through the\n *  grammar can match the input.</li>\n *  <li><b>Weak context sensitivity</b>: These are cases where full-context\n *  prediction resolved an SLL conflict to a unique alternative which equaled the\n *  minimum alternative of the SLL conflict.</li>\n *  <li><b>Strong (forced) context sensitivity</b>: These are cases where the\n *  full-context prediction resolved an SLL conflict to a unique alternative,\n *  <em>and</em> the minimum alternative of the SLL conflict was found to not be\n *  a truly viable alternative. Two-stage parsing cannot be used for inputs where\n *  this situation occurs.</li>\n *  </ul>\n */\nexport default class DiagnosticErrorListener extends ErrorListener {\n\tconstructor(exactOnly) {\n\t\tsuper();\n\t\texactOnly = exactOnly || true;\n\t\t// whether all ambiguities or only exact ambiguities are reported.\n\t\tthis.exactOnly = exactOnly;\n\t}\n\n\treportAmbiguity(recognizer, dfa, startIndex, stopIndex, exact, ambigAlts, configs) {\n\t\tif (this.exactOnly && !exact) {\n\t\t\treturn;\n\t\t}\n\t\tconst msg = \"reportAmbiguity d=\" +\n\t\t\tthis.getDecisionDescription(recognizer, dfa) +\n\t\t\t\": ambigAlts=\" +\n\t\t\tthis.getConflictingAlts(ambigAlts, configs) +\n\t\t\t\", input='\" +\n\t\t\trecognizer.getTokenStream().getText(new Interval(startIndex, stopIndex)) + \"'\"\n\t\trecognizer.notifyErrorListeners(msg);\n\t}\n\n\treportAttemptingFullContext(recognizer, dfa, startIndex, stopIndex, conflictingAlts, configs) {\n\t\tconst msg = \"reportAttemptingFullContext d=\" +\n\t\t\tthis.getDecisionDescription(recognizer, dfa) +\n\t\t\t\", input='\" +\n\t\t\trecognizer.getTokenStream().getText(new Interval(startIndex, stopIndex)) + \"'\"\n\t\trecognizer.notifyErrorListeners(msg);\n\t}\n\n\treportContextSensitivity(recognizer, dfa, startIndex, stopIndex, prediction, configs) {\n\t\tconst msg = \"reportContextSensitivity d=\" +\n\t\t\tthis.getDecisionDescription(recognizer, dfa) +\n\t\t\t\", input='\" +\n\t\t\trecognizer.getTokenStream().getText(new Interval(startIndex, stopIndex)) + \"'\"\n\t\trecognizer.notifyErrorListeners(msg);\n\t}\n\n\tgetDecisionDescription(recognizer, dfa) {\n\t\tconst decision = dfa.decision\n\t\tconst ruleIndex = dfa.atnStartState.ruleIndex\n\n\t\tconst ruleNames = recognizer.ruleNames\n\t\tif (ruleIndex < 0 || ruleIndex >= ruleNames.length) {\n\t\t\treturn \"\" + decision;\n\t\t}\n\t\tconst ruleName = ruleNames[ruleIndex] || null\n\t\tif (ruleName === null || ruleName.length === 0) {\n\t\t\treturn \"\" + decision;\n\t\t}\n\t\treturn `${decision} (${ruleName})`;\n\t}\n\n\t/**\n\t * Computes the set of conflicting or ambiguous alternatives from a\n\t * configuration set, if that information was not already provided by the\n\t * parser.\n\t *\n\t * @param reportedAlts The set of conflicting or ambiguous alternatives, as\n\t * reported by the parser.\n\t * @param configs The conflicting or ambiguous configuration set.\n\t * @return Returns {@code reportedAlts} if it is not {@code null}, otherwise\n\t * returns the set of alternatives represented in {@code configs}.\n     */\n\tgetConflictingAlts(reportedAlts, configs) {\n\t\tif (reportedAlts !== null) {\n\t\t\treturn reportedAlts;\n\t\t}\n\t\tconst result = new BitSet()\n\t\tfor (let i = 0; i < configs.items.length; i++) {\n\t\t\tresult.add(configs.items[i].alt);\n\t\t}\n\t\treturn `{${result.values().join(\", \")}}`;\n\t}\n}\n","/* Copyright (c) 2012-2022 The ANTLR Project Contributors. All rights reserved.\n * Use is of this file is governed by the BSD 3-clause license that\n * can be found in the LICENSE.txt file in the project root.\n */\nexport default class ParseCancellationException extends Error {\n    constructor() {\n        super()\n        Error.captureStackTrace(this, ParseCancellationException);\n    }\n}\n","/* Copyright (c) 2012-2022 The ANTLR Project Contributors. All rights reserved.\n * Use is of this file is governed by the BSD 3-clause license that\n * can be found in the LICENSE.txt file in the project root.\n */\nimport FailedPredicateException from \"./FailedPredicateException.js\";\nimport InputMismatchException from \"./InputMismatchException.js\";\nimport NoViableAltException from \"./NoViableAltException.js\";\nimport ATNState from \"../state/ATNState.js\";\nimport Token from '../Token.js';\nimport Interval from \"../misc/Interval.js\";\nimport IntervalSet from \"../misc/IntervalSet.js\";\nimport ErrorStrategy from \"./ErrorStrategy.js\";\n\n/**\n * This is the default implementation of {@link ANTLRErrorStrategy} used for\n * error reporting and recovery in ANTLR parsers.\n */\nexport default class DefaultErrorStrategy extends ErrorStrategy {\n    constructor() {\n        super();\n        /**\n         * Indicates whether the error strategy is currently \"recovering from an\n         * error\". This is used to suppress reporting multiple error messages while\n         * attempting to recover from a detected syntax error.\n         *\n         * @see //inErrorRecoveryMode\n         */\n        this.errorRecoveryMode = false;\n\n        /**\n         * The index into the input stream where the last error occurred.\n         * This is used to prevent infinite loops where an error is found\n         * but no token is consumed during recovery...another error is found,\n         * ad nauseum. This is a failsafe mechanism to guarantee that at least\n         * one token/tree node is consumed for two errors.\n         */\n        this.lastErrorIndex = -1;\n        this.lastErrorStates = null;\n        this.nextTokensContext = null;\n        this.nextTokenState = 0;\n    }\n\n    /**\n     * <p>The default implementation simply calls {@link //endErrorCondition} to\n     * ensure that the handler is not in error recovery mode.</p>\n     */\n    reset(recognizer) {\n        this.endErrorCondition(recognizer);\n    }\n\n    /**\n     * This method is called to enter error recovery mode when a recognition\n     * exception is reported.\n     *\n     * @param recognizer the parser instance\n     */\n    beginErrorCondition(recognizer) {\n        this.errorRecoveryMode = true;\n    }\n\n    inErrorRecoveryMode(recognizer) {\n        return this.errorRecoveryMode;\n    }\n\n    /**\n     * This method is called to leave error recovery mode after recovering from\n     * a recognition exception.\n     * @param recognizer\n     */\n    endErrorCondition(recognizer) {\n        this.errorRecoveryMode = false;\n        this.lastErrorStates = null;\n        this.lastErrorIndex = -1;\n    }\n\n    /**\n     * {@inheritDoc}\n     * <p>The default implementation simply calls {@link //endErrorCondition}.</p>\n     */\n    reportMatch(recognizer) {\n        this.endErrorCondition(recognizer);\n    }\n\n    /**\n     * {@inheritDoc}\n     *\n     * <p>The default implementation returns immediately if the handler is already\n     * in error recovery mode. Otherwise, it calls {@link //beginErrorCondition}\n     * and dispatches the reporting task based on the runtime type of {@code e}\n     * according to the following table.</p>\n     *\n     * <ul>\n     * <li>{@link NoViableAltException}: Dispatches the call to\n     * {@link //reportNoViableAlternative}</li>\n     * <li>{@link InputMismatchException}: Dispatches the call to\n     * {@link //reportInputMismatch}</li>\n     * <li>{@link FailedPredicateException}: Dispatches the call to\n     * {@link //reportFailedPredicate}</li>\n     * <li>All other types: calls {@link Parser//notifyErrorListeners} to report\n     * the exception</li>\n     * </ul>\n     */\n    reportError(recognizer, e) {\n        // if we've already reported an error and have not matched a token\n        // yet successfully, don't report any errors.\n        if(this.inErrorRecoveryMode(recognizer)) {\n            return; // don't report spurious errors\n        }\n        this.beginErrorCondition(recognizer);\n        if ( e instanceof NoViableAltException ) {\n            this.reportNoViableAlternative(recognizer, e);\n        } else if ( e instanceof InputMismatchException ) {\n            this.reportInputMismatch(recognizer, e);\n        } else if ( e instanceof FailedPredicateException ) {\n            this.reportFailedPredicate(recognizer, e);\n        } else {\n            console.log(\"unknown recognition error type: \" + e.constructor.name);\n            console.log(e.stack);\n            recognizer.notifyErrorListeners(e.getOffendingToken(), e.getMessage(), e);\n        }\n    }\n\n    /**\n     *\n     * {@inheritDoc}\n     *\n     * <p>The default implementation resynchronizes the parser by consuming tokens\n     * until we find one in the resynchronization set--loosely the set of tokens\n     * that can follow the current rule.</p>\n     *\n     */\n    recover(recognizer, e) {\n        if (this.lastErrorIndex===recognizer.getInputStream().index &&\n            this.lastErrorStates !== null && this.lastErrorStates.indexOf(recognizer.state)>=0) {\n            // uh oh, another error at same token index and previously-visited\n            // state in ATN; must be a case where LT(1) is in the recovery\n            // token set so nothing got consumed. Consume a single token\n            // at least to prevent an infinite loop; this is a failsafe.\n            recognizer.consume();\n        }\n        this.lastErrorIndex = recognizer._input.index;\n        if (this.lastErrorStates === null) {\n            this.lastErrorStates = [];\n        }\n        this.lastErrorStates.push(recognizer.state);\n        const followSet = this.getErrorRecoverySet(recognizer)\n        this.consumeUntil(recognizer, followSet);\n    }\n\n    /**\n     * The default implementation of {@link ANTLRErrorStrategy//sync} makes sure\n     * that the current lookahead symbol is consistent with what were expecting\n     * at this point in the ATN. You can call this anytime but ANTLR only\n     * generates code to check before subrules/loops and each iteration.\n     *\n     * <p>Implements Jim Idle's magic sync mechanism in closures and optional\n     * subrules. E.g.,</p>\n     *\n     * <pre>\n     * a : sync ( stuff sync )* ;\n     * sync : {consume to what can follow sync} ;\n     * </pre>\n     *\n     * At the start of a sub rule upon error, {@link //sync} performs single\n     * token deletion, if possible. If it can't do that, it bails on the current\n     * rule and uses the default error recovery, which consumes until the\n     * resynchronization set of the current rule.\n     *\n     * <p>If the sub rule is optional ({@code (...)?}, {@code (...)*}, or block\n     * with an empty alternative), then the expected set includes what follows\n     * the subrule.</p>\n     *\n     * <p>During loop iteration, it consumes until it sees a token that can start a\n     * sub rule or what follows loop. Yes, that is pretty aggressive. We opt to\n     * stay in the loop as long as possible.</p>\n     *\n     * <p><strong>ORIGINS</strong></p>\n     *\n     * <p>Previous versions of ANTLR did a poor job of their recovery within loops.\n     * A single mismatch token or missing token would force the parser to bail\n     * out of the entire rules surrounding the loop. So, for rule</p>\n     *\n     * <pre>\n     * classDef : 'class' ID '{' member* '}'\n     * </pre>\n     *\n     * input with an extra token between members would force the parser to\n     * consume until it found the next class definition rather than the next\n     * member definition of the current class.\n     *\n     * <p>This functionality cost a little bit of effort because the parser has to\n     * compare token set at the start of the loop and at each iteration. If for\n     * some reason speed is suffering for you, you can turn off this\n     * functionality by simply overriding this method as a blank { }.</p>\n     *\n     */\n    sync(recognizer) {\n        // If already recovering, don't try to sync\n        if (this.inErrorRecoveryMode(recognizer)) {\n            return;\n        }\n        const s = recognizer._interp.atn.states[recognizer.state];\n        const la = recognizer.getTokenStream().LA(1);\n        // try cheaper subset first; might get lucky. seems to shave a wee bit off\n        const nextTokens = recognizer.atn.nextTokens(s);\n        if(nextTokens.contains(la)) {\n            this.nextTokensContext = null;\n            this.nextTokenState = ATNState.INVALID_STATE_NUMBER;\n            return;\n        } else if (nextTokens.contains(Token.EPSILON)) {\n            if(this.nextTokensContext === null) {\n                // It's possible the next token won't match information tracked\n                // by sync is restricted for performance.\n                this.nextTokensContext = recognizer._ctx;\n                this.nextTokensState = recognizer._stateNumber;\n            }\n            return;\n        }\n        switch (s.stateType) {\n            case ATNState.BLOCK_START:\n            case ATNState.STAR_BLOCK_START:\n            case ATNState.PLUS_BLOCK_START:\n            case ATNState.STAR_LOOP_ENTRY:\n                // report error and recover if possible\n                if( this.singleTokenDeletion(recognizer) !== null) {\n                    return;\n                } else {\n                    throw new InputMismatchException(recognizer);\n                }\n            case ATNState.PLUS_LOOP_BACK:\n            case ATNState.STAR_LOOP_BACK:\n                {\n                this.reportUnwantedToken(recognizer);\n                const expecting = new IntervalSet();\n                expecting.addSet(recognizer.getExpectedTokens());\n                const whatFollowsLoopIterationOrRule = expecting.addSet(this.getErrorRecoverySet(recognizer));\n                this.consumeUntil(recognizer, whatFollowsLoopIterationOrRule);\n                }\n                break;\n            default:\n            // do nothing if we can't identify the exact kind of ATN state\n        }\n    }\n\n    /**\n     * This is called by {@link //reportError} when the exception is a\n     * {@link NoViableAltException}.\n     *\n     * @see //reportError\n     *\n     * @param recognizer the parser instance\n     * @param e the recognition exception\n     */\n    reportNoViableAlternative(recognizer, e) {\n        const tokens = recognizer.getTokenStream()\n        let input\n        if(tokens !== null) {\n            if (e.startToken.type===Token.EOF) {\n                input = \"<EOF>\";\n            } else {\n                input = tokens.getText(new Interval(e.startToken.tokenIndex, e.offendingToken.tokenIndex));\n            }\n        } else {\n            input = \"<unknown input>\";\n        }\n        const msg = \"no viable alternative at input \" + this.escapeWSAndQuote(input)\n        recognizer.notifyErrorListeners(msg, e.offendingToken, e);\n    }\n\n    /**\n     * This is called by {@link //reportError} when the exception is an\n     * {@link InputMismatchException}.\n     *\n     * @see //reportError\n     *\n     * @param recognizer the parser instance\n     * @param e the recognition exception\n     */\n    reportInputMismatch(recognizer, e) {\n        const msg = \"mismatched input \" + this.getTokenErrorDisplay(e.offendingToken) +\n            \" expecting \" + e.getExpectedTokens().toString(recognizer.literalNames, recognizer.symbolicNames)\n        recognizer.notifyErrorListeners(msg, e.offendingToken, e);\n    }\n\n    /**\n     * This is called by {@link //reportError} when the exception is a\n     * {@link FailedPredicateException}.\n     *\n     * @see //reportError\n     *\n     * @param recognizer the parser instance\n     * @param e the recognition exception\n     */\n    reportFailedPredicate(recognizer, e) {\n        const ruleName = recognizer.ruleNames[recognizer._ctx.ruleIndex]\n        const msg = \"rule \" + ruleName + \" \" + e.message\n        recognizer.notifyErrorListeners(msg, e.offendingToken, e);\n    }\n\n    /**\n     * This method is called to report a syntax error which requires the removal\n     * of a token from the input stream. At the time this method is called, the\n     * erroneous symbol is current {@code LT(1)} symbol and has not yet been\n     * removed from the input stream. When this method returns,\n     * {@code recognizer} is in error recovery mode.\n     *\n     * <p>This method is called when {@link //singleTokenDeletion} identifies\n     * single-token deletion as a viable recovery strategy for a mismatched\n     * input error.</p>\n     *\n     * <p>The default implementation simply returns if the handler is already in\n     * error recovery mode. Otherwise, it calls {@link //beginErrorCondition} to\n     * enter error recovery mode, followed by calling\n     * {@link Parser//notifyErrorListeners}.</p>\n     *\n     * @param recognizer the parser instance\n     *\n     */\n    reportUnwantedToken(recognizer) {\n        if (this.inErrorRecoveryMode(recognizer)) {\n            return;\n        }\n        this.beginErrorCondition(recognizer);\n        const t = recognizer.getCurrentToken()\n        const tokenName = this.getTokenErrorDisplay(t)\n        const expecting = this.getExpectedTokens(recognizer)\n        const msg = \"extraneous input \" + tokenName + \" expecting \" +\n            expecting.toString(recognizer.literalNames, recognizer.symbolicNames)\n        recognizer.notifyErrorListeners(msg, t, null);\n    }\n\n    /**\n     * This method is called to report a syntax error which requires the\n     * insertion of a missing token into the input stream. At the time this\n     * method is called, the missing token has not yet been inserted. When this\n     * method returns, {@code recognizer} is in error recovery mode.\n     *\n     * <p>This method is called when {@link //singleTokenInsertion} identifies\n     * single-token insertion as a viable recovery strategy for a mismatched\n     * input error.</p>\n     *\n     * <p>The default implementation simply returns if the handler is already in\n     * error recovery mode. Otherwise, it calls {@link //beginErrorCondition} to\n     * enter error recovery mode, followed by calling\n     * {@link Parser//notifyErrorListeners}.</p>\n     *\n     * @param recognizer the parser instance\n     */\n    reportMissingToken(recognizer) {\n        if ( this.inErrorRecoveryMode(recognizer)) {\n            return;\n        }\n        this.beginErrorCondition(recognizer);\n        const t = recognizer.getCurrentToken()\n        const expecting = this.getExpectedTokens(recognizer)\n        const msg = \"missing \" + expecting.toString(recognizer.literalNames, recognizer.symbolicNames) +\n            \" at \" + this.getTokenErrorDisplay(t)\n        recognizer.notifyErrorListeners(msg, t, null);\n    }\n\n    /**\n     * <p>The default implementation attempts to recover from the mismatched input\n     * by using single token insertion and deletion as described below. If the\n     * recovery attempt fails, this method throws an\n     * {@link InputMismatchException}.</p>\n     *\n     * <p><strong>EXTRA TOKEN</strong> (single token deletion)</p>\n     *\n     * <p>{@code LA(1)} is not what we are looking for. If {@code LA(2)} has the\n     * right token, however, then assume {@code LA(1)} is some extra spurious\n     * token and delete it. Then consume and return the next token (which was\n     * the {@code LA(2)} token) as the successful result of the match operation.</p>\n     *\n     * <p>This recovery strategy is implemented by {@link\n        * //singleTokenDeletion}.</p>\n     *\n     * <p><strong>MISSING TOKEN</strong> (single token insertion)</p>\n     *\n     * <p>If current token (at {@code LA(1)}) is consistent with what could come\n     * after the expected {@code LA(1)} token, then assume the token is missing\n     * and use the parser's {@link TokenFactory} to create it on the fly. The\n     * \"insertion\" is performed by returning the created token as the successful\n     * result of the match operation.</p>\n     *\n     * <p>This recovery strategy is implemented by {@link\n        * //singleTokenInsertion}.</p>\n     *\n     * <p><strong>EXAMPLE</strong></p>\n     *\n     * <p>For example, Input {@code i=(3;} is clearly missing the {@code ')'}. When\n     * the parser returns from the nested call to {@code expr}, it will have\n     * call chain:</p>\n     *\n     * <pre>\n     * stat &rarr; expr &rarr; atom\n     * </pre>\n     *\n     * and it will be trying to match the {@code ')'} at this point in the\n     * derivation:\n     *\n     * <pre>\n     * =&gt; ID '=' '(' INT ')' ('+' atom)* ';'\n     * ^\n     * </pre>\n     *\n     * The attempt to match {@code ')'} will fail when it sees {@code ';'} and\n     * call {@link //recoverInline}. To recover, it sees that {@code LA(1)==';'}\n     * is in the set of tokens that can follow the {@code ')'} token reference\n     * in rule {@code atom}. It can assume that you forgot the {@code ')'}.\n     */\n    recoverInline(recognizer) {\n        // SINGLE TOKEN DELETION\n        const matchedSymbol = this.singleTokenDeletion(recognizer)\n        if (matchedSymbol !== null) {\n            // we have deleted the extra token.\n            // now, move past ttype token as if all were ok\n            recognizer.consume();\n            return matchedSymbol;\n        }\n        // SINGLE TOKEN INSERTION\n        if (this.singleTokenInsertion(recognizer)) {\n            return this.getMissingSymbol(recognizer);\n        }\n        // even that didn't work; must throw the exception\n        throw new InputMismatchException(recognizer);\n    }\n\n    /**\n     * This method implements the single-token insertion inline error recovery\n     * strategy. It is called by {@link //recoverInline} if the single-token\n     * deletion strategy fails to recover from the mismatched input. If this\n     * method returns {@code true}, {@code recognizer} will be in error recovery\n     * mode.\n     *\n     * <p>This method determines whether or not single-token insertion is viable by\n     * checking if the {@code LA(1)} input symbol could be successfully matched\n     * if it were instead the {@code LA(2)} symbol. If this method returns\n     * {@code true}, the caller is responsible for creating and inserting a\n     * token with the correct type to produce this behavior.</p>\n     *\n     * @param recognizer the parser instance\n     * @return {@code true} if single-token insertion is a viable recovery\n     * strategy for the current mismatched input, otherwise {@code false}\n     */\n    singleTokenInsertion(recognizer) {\n        const currentSymbolType = recognizer.getTokenStream().LA(1)\n        // if current token is consistent with what could come after current\n        // ATN state, then we know we're missing a token; error recovery\n        // is free to conjure up and insert the missing token\n        const atn = recognizer._interp.atn\n        const currentState = atn.states[recognizer.state]\n        const next = currentState.transitions[0].target\n        const expectingAtLL2 = atn.nextTokens(next, recognizer._ctx)\n        if (expectingAtLL2.contains(currentSymbolType) ){\n            this.reportMissingToken(recognizer);\n            return true;\n        } else {\n            return false;\n        }\n    }\n\n    /**\n     * This method implements the single-token deletion inline error recovery\n     * strategy. It is called by {@link //recoverInline} to attempt to recover\n     * from mismatched input. If this method returns null, the parser and error\n     * handler state will not have changed. If this method returns non-null,\n     * {@code recognizer} will <em>not</em> be in error recovery mode since the\n     * returned token was a successful match.\n     *\n     * <p>If the single-token deletion is successful, this method calls\n     * {@link //reportUnwantedToken} to report the error, followed by\n     * {@link Parser//consume} to actually \"delete\" the extraneous token. Then,\n     * before returning {@link //reportMatch} is called to signal a successful\n     * match.</p>\n     *\n     * @param recognizer the parser instance\n     * @return the successfully matched {@link Token} instance if single-token\n     * deletion successfully recovers from the mismatched input, otherwise\n     * {@code null}\n     */\n    singleTokenDeletion(recognizer) {\n        const nextTokenType = recognizer.getTokenStream().LA(2)\n        const expecting = this.getExpectedTokens(recognizer)\n        if (expecting.contains(nextTokenType)) {\n            this.reportUnwantedToken(recognizer);\n            // print(\"recoverFromMismatchedToken deleting \" \\\n            // + str(recognizer.getTokenStream().LT(1)) \\\n            // + \" since \" + str(recognizer.getTokenStream().LT(2)) \\\n            // + \" is what we want\", file=sys.stderr)\n            recognizer.consume(); // simply delete extra token\n            // we want to return the token we're actually matching\n            const matchedSymbol = recognizer.getCurrentToken()\n            this.reportMatch(recognizer); // we know current token is correct\n            return matchedSymbol;\n        } else {\n            return null;\n        }\n    }\n\n    /**\n     * Conjure up a missing token during error recovery.\n     *\n     * The recognizer attempts to recover from single missing\n     * symbols. But, actions might refer to that missing symbol.\n     * For example, x=ID {f($x);}. The action clearly assumes\n     * that there has been an identifier matched previously and that\n     * $x points at that token. If that token is missing, but\n     * the next token in the stream is what we want we assume that\n     * this token is missing and we keep going. Because we\n     * have to return some token to replace the missing token,\n     * we have to conjure one up. This method gives the user control\n     * over the tokens returned for missing tokens. Mostly,\n     * you will want to create something special for identifier\n     * tokens. For literals such as '{' and ',', the default\n     * action in the parser or tree parser works. It simply creates\n     * a CommonToken of the appropriate type. The text will be the token.\n     * If you change what tokens must be created by the lexer,\n     * override this method to create the appropriate tokens.\n     *\n     */\n    getMissingSymbol(recognizer) {\n        const currentSymbol = recognizer.getCurrentToken()\n        const expecting = this.getExpectedTokens(recognizer)\n        const expectedTokenType = expecting.first() // get any element\n        let tokenText\n        if (expectedTokenType===Token.EOF) {\n            tokenText = \"<missing EOF>\";\n        } else {\n            tokenText = \"<missing \" + recognizer.literalNames[expectedTokenType] + \">\";\n        }\n        let current = currentSymbol\n        const lookback = recognizer.getTokenStream().LT(-1)\n        if (current.type===Token.EOF && lookback !== null) {\n            current = lookback;\n        }\n        return recognizer.getTokenFactory().create(current.source,\n            expectedTokenType, tokenText, Token.DEFAULT_CHANNEL,\n            -1, -1, current.line, current.column);\n    }\n\n    getExpectedTokens(recognizer) {\n        return recognizer.getExpectedTokens();\n    }\n\n    /**\n     * How should a token be displayed in an error message? The default\n     * is to display just the text, but during development you might\n     * want to have a lot of information spit out. Override in that case\n     * to use t.toString() (which, for CommonToken, dumps everything about\n     * the token). This is better than forcing you to override a method in\n     * your token objects because you don't have to go modify your lexer\n     * so that it creates a new Java type.\n     */\n    getTokenErrorDisplay(t) {\n        if (t === null) {\n            return \"<no token>\";\n        }\n        let s = t.text\n        if (s === null) {\n            if (t.type===Token.EOF) {\n                s = \"<EOF>\";\n            } else {\n                s = \"<\" + t.type + \">\";\n            }\n        }\n        return this.escapeWSAndQuote(s);\n    }\n\n    escapeWSAndQuote(s) {\n        s = s.replace(/\\n/g,\"\\\\n\");\n        s = s.replace(/\\r/g,\"\\\\r\");\n        s = s.replace(/\\t/g,\"\\\\t\");\n        return \"'\" + s + \"'\";\n    }\n\n    /**\n     * Compute the error recovery set for the current rule. During\n     * rule invocation, the parser pushes the set of tokens that can\n     * follow that rule reference on the stack; this amounts to\n     * computing FIRST of what follows the rule reference in the\n     * enclosing rule. See LinearApproximator.FIRST().\n     * This local follow set only includes tokens\n     * from within the rule; i.e., the FIRST computation done by\n     * ANTLR stops at the end of a rule.\n     *\n     * EXAMPLE\n     *\n     * When you find a \"no viable alt exception\", the input is not\n     * consistent with any of the alternatives for rule r. The best\n     * thing to do is to consume tokens until you see something that\n     * can legally follow a call to r//or* any rule that called r.\n     * You don't want the exact set of viable next tokens because the\n     * input might just be missing a token--you might consume the\n     * rest of the input looking for one of the missing tokens.\n     *\n     * Consider grammar:\n     *\n     * a : '[' b ']'\n     * | '(' b ')'\n     * ;\n     * b : c '^' INT ;\n     * c : ID\n     * | INT\n     * ;\n     *\n     * At each rule invocation, the set of tokens that could follow\n     * that rule is pushed on a stack. Here are the various\n     * context-sensitive follow sets:\n     *\n     * FOLLOW(b1_in_a) = FIRST(']') = ']'\n     * FOLLOW(b2_in_a) = FIRST(')') = ')'\n     * FOLLOW(c_in_b) = FIRST('^') = '^'\n     *\n     * Upon erroneous input \"[]\", the call chain is\n     *\n     * a -> b -> c\n     *\n     * and, hence, the follow context stack is:\n     *\n     * depth follow set start of rule execution\n     * 0 <EOF> a (from main())\n     * 1 ']' b\n     * 2 '^' c\n     *\n     * Notice that ')' is not included, because b would have to have\n     * been called from a different context in rule a for ')' to be\n     * included.\n     *\n     * For error recovery, we cannot consider FOLLOW(c)\n     * (context-sensitive or otherwise). We need the combined set of\n     * all context-sensitive FOLLOW sets--the set of all tokens that\n     * could follow any reference in the call chain. We need to\n     * resync to one of those tokens. Note that FOLLOW(c)='^' and if\n     * we resync'd to that token, we'd consume until EOF. We need to\n     * sync to context-sensitive FOLLOWs for a, b, and c: {']','^'}.\n     * In this case, for input \"[]\", LA(1) is ']' and in the set, so we would\n     * not consume anything. After printing an error, rule c would\n     * return normally. Rule b would not find the required '^' though.\n     * At this point, it gets a mismatched token error and throws an\n     * exception (since LA(1) is not in the viable following token\n     * set). The rule exception handler tries to recover, but finds\n     * the same recovery set and doesn't consume anything. Rule b\n     * exits normally returning to rule a. Now it finds the ']' (and\n     * with the successful match exits errorRecovery mode).\n     *\n     * So, you can see that the parser walks up the call chain looking\n     * for the token that was a member of the recovery set.\n     *\n     * Errors are not generated in errorRecovery mode.\n     *\n     * ANTLR's error recovery mechanism is based upon original ideas:\n     *\n     * \"Algorithms + Data Structures = Programs\" by Niklaus Wirth\n     *\n     * and\n     *\n     * \"A note on error recovery in recursive descent parsers\":\n     * http://portal.acm.org/citation.cfm?id=947902.947905\n     *\n     * Later, Josef Grosch had some good ideas:\n     *\n     * \"Efficient and Comfortable Error Recovery in Recursive Descent\n     * Parsers\":\n     * ftp://www.cocolab.com/products/cocktail/doca4.ps/ell.ps.zip\n     *\n     * Like Grosch I implement context-sensitive FOLLOW sets that are combined\n     * at run-time upon error to avoid overhead during parsing.\n     */\n    getErrorRecoverySet(recognizer) {\n        const atn = recognizer._interp.atn\n        let ctx = recognizer._ctx\n        const recoverSet = new IntervalSet()\n        while (ctx !== null && ctx.invokingState>=0) {\n            // compute what follows who invoked us\n            const invokingState = atn.states[ctx.invokingState]\n            const rt = invokingState.transitions[0]\n            const follow = atn.nextTokens(rt.followState)\n            recoverSet.addSet(follow);\n            ctx = ctx.parentCtx;\n        }\n        recoverSet.removeOne(Token.EPSILON);\n        return recoverSet;\n    }\n\n// Consume tokens until one matches the given token set.//\n    consumeUntil(recognizer, set) {\n        let ttype = recognizer.getTokenStream().LA(1)\n        while( ttype !== Token.EOF && !set.contains(ttype)) {\n            recognizer.consume();\n            ttype = recognizer.getTokenStream().LA(1);\n        }\n    }\n}\n\n","/* Copyright (c) 2012-2022 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause license that\n * can be found in the LICENSE.txt file in the project root.\n */\n\nexport default class ErrorStrategy {\n\n    reset(recognizer) {\n    }\n\n    recoverInline(recognizer) {\n    }\n\n    recover(recognizer, e) {\n    }\n\n    sync(recognizer) {\n    }\n\n    inErrorRecoveryMode(recognizer) {\n    }\n\n    reportError(recognizer) {\n    }\n}\n\n\n","/* Copyright (c) 2012-2022 The ANTLR Project Contributors. All rights reserved.\n * Use is of this file is governed by the BSD 3-clause license that\n * can be found in the LICENSE.txt file in the project root.\n */\nimport InputMismatchException from \"./InputMismatchException.js\";\nimport ParseCancellationException from \"./ParseCancellationException.js\";\nimport DefaultErrorStrategy from \"./DefaultErrorStrategy.js\";\n\n/**\n * This implementation of {@link ANTLRErrorStrategy} responds to syntax errors\n * by immediately canceling the parse operation with a\n * {@link ParseCancellationException}. The implementation ensures that the\n * {@link ParserRuleContext//exception} field is set for all parse tree nodes\n * that were not completed prior to encountering the error.\n *\n * <p>\n * This error strategy is useful in the following scenarios.</p>\n *\n * <ul>\n * <li><strong>Two-stage parsing:</strong> This error strategy allows the first\n * stage of two-stage parsing to immediately terminate if an error is\n * encountered, and immediately fall back to the second stage. In addition to\n * avoiding wasted work by attempting to recover from errors here, the empty\n * implementation of {@link BailErrorStrategy//sync} improves the performance of\n * the first stage.</li>\n * <li><strong>Silent validation:</strong> When syntax errors are not being\n * reported or logged, and the parse result is simply ignored if errors occur,\n * the {@link BailErrorStrategy} avoids wasting work on recovering from errors\n * when the result will be ignored either way.</li>\n * </ul>\n *\n * <p>\n * {@code myparser.setErrorHandler(new BailErrorStrategy());}</p>\n *\n * @see Parser//setErrorHandler(ANTLRErrorStrategy)\n * */\nexport default class BailErrorStrategy extends DefaultErrorStrategy {\n\n    constructor() {\n        super();\n    }\n\n    /**\n     * Instead of recovering from exception {@code e}, re-throw it wrapped\n     * in a {@link ParseCancellationException} so it is not caught by the\n     * rule function catches. Use {@link Exception//getCause()} to get the\n     * original {@link RecognitionException}.\n     */\n    recover(recognizer, e) {\n        let context = recognizer._ctx\n        while (context !== null) {\n            context.exception = e;\n            context = context.parentCtx;\n        }\n        throw new ParseCancellationException(e);\n    }\n\n    /**\n     * Make sure we don't attempt to recover inline; if the parser\n     * successfully recovers, it won't throw an exception.\n     */\n    recoverInline(recognizer) {\n        this.recover(recognizer, new InputMismatchException(recognizer));\n    }\n\n// Make sure we don't attempt to recover from problems in subrules.//\n    sync(recognizer) {\n        // pass\n    }\n}\n","/* Copyright (c) 2012-2022 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause license that\n * can be found in the LICENSE.txt file in the project root.\n */\n\nimport RecognitionException from './RecognitionException.js';\nimport NoViableAltException from './NoViableAltException.js';\nimport LexerNoViableAltException from './LexerNoViableAltException.js';\nimport InputMismatchException from './InputMismatchException.js';\nimport FailedPredicateException from './FailedPredicateException.js';\nimport DiagnosticErrorListener from './DiagnosticErrorListener.js';\nimport BailErrorStrategy from './BailErrorStrategy.js';\nimport DefaultErrorStrategy from './DefaultErrorStrategy.js';\nimport ErrorListener from './ErrorListener.js';\n\nexport default {\n    RecognitionException, NoViableAltException, LexerNoViableAltException, InputMismatchException, FailedPredicateException,\n    DiagnosticErrorListener, BailErrorStrategy, DefaultErrorStrategy, ErrorListener\n}\n","/* Copyright (c) 2012-2022 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause license that\n * can be found in the LICENSE.txt file in the project root.\n */\n\nimport Token from './Token.js';\n\n/**\n * If decodeToUnicodeCodePoints is true, the input is treated\n * as a series of Unicode code points.\n *\n * Otherwise, the input is treated as a series of 16-bit UTF-16 code\n * units.\n */\nexport default class CharStream {\n    constructor(data, decodeToUnicodeCodePoints) {\n        this.name = \"<empty>\";\n        this.strdata = data;\n        this.decodeToUnicodeCodePoints = decodeToUnicodeCodePoints || false;\n        // _loadString - Vacuum all input from a string and then treat it like a buffer.\n        this._index = 0;\n        this.data = [];\n        if (this.decodeToUnicodeCodePoints) {\n            for (let i = 0; i < this.strdata.length; ) {\n                const codePoint = this.strdata.codePointAt(i);\n                this.data.push(codePoint);\n                i += codePoint <= 0xFFFF ? 1 : 2;\n            }\n        } else {\n            this.data = new Array(this.strdata.length);\n            for (let i = 0; i < this.strdata.length; i++) {\n                this.data[i] = this.strdata.charCodeAt(i);\n            }\n        }\n        this._size = this.data.length;\n    }\n\n    /**\n     * Reset the stream so that it's in the same state it was\n     * when the object was created *except* the data array is not\n     * touched.\n     */\n    reset() {\n        this._index = 0;\n    }\n\n    consume() {\n        if (this._index >= this._size) {\n            // assert this.LA(1) == Token.EOF\n            throw (\"cannot consume EOF\");\n        }\n        this._index += 1;\n    }\n\n    LA(offset) {\n        if (offset === 0) {\n            return 0; // undefined\n        }\n        if (offset < 0) {\n            offset += 1; // e.g., translate LA(-1) to use offset=0\n        }\n        const pos = this._index + offset - 1;\n        if (pos < 0 || pos >= this._size) { // invalid\n            return Token.EOF;\n        }\n        return this.data[pos];\n    }\n\n    LT(offset) {\n        return this.LA(offset);\n    }\n\n// mark/release do nothing; we have entire buffer\n    mark() {\n        return -1;\n    }\n\n    release(marker) {\n    }\n\n    /**\n     * consume() ahead until p==_index; can't just set p=_index as we must\n     * update line and column. If we seek backwards, just set p\n     */\n    seek(_index) {\n        if (_index <= this._index) {\n            this._index = _index; // just jump; don't update stream state (line,\n            // ...)\n            return;\n        }\n        // seek forward\n        this._index = Math.min(_index, this._size);\n    }\n\n    getText(start, stop) {\n        if (stop >= this._size) {\n            stop = this._size - 1;\n        }\n        if (start >= this._size) {\n            return \"\";\n        } else {\n            if (this.decodeToUnicodeCodePoints) {\n                let result = \"\";\n                for (let i = start; i <= stop; i++) {\n                    result += String.fromCodePoint(this.data[i]);\n                }\n                return result;\n            } else {\n                return this.strdata.slice(start, stop + 1);\n            }\n        }\n    }\n\n    toString() {\n        return this.strdata;\n    }\n\n    get index(){\n        return this._index;\n    }\n\n    get size(){\n        return this._size;\n    }\n}\n","/* Copyright (c) 2012-2022 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause license that\n * can be found in the LICENSE.txt file in the project root.\n */\n\nimport CharStream from './CharStream.js';\n\n/**\n * @deprecated Use CharStream instead\n*/\nexport default class InputStream extends CharStream {\n\tconstructor(data, decodeToUnicodeCodePoints) {\n\t\tsuper(data, decodeToUnicodeCodePoints);\n\t}\n}\n","/* Copyright (c) 2012-2022 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause license that\n * can be found in the LICENSE.txt file in the project root.\n */\n\nimport InputStream from './InputStream.js';\nimport CharStream from './CharStream.js';\nconst isNode =\n\ttypeof process !== \"undefined\" &&\n\tprocess.versions != null &&\n\tprocess.versions.node != null;\nimport fs from 'fs';\n\n/**\n * This is an InputStream that is loaded from a file all at once\n * when you construct the object.\n */\nexport default class FileStream extends InputStream {\n\n\tstatic fromPath(path, encoding, callback) {\n\t\tif(!isNode)\n\t\t\tthrow new Error(\"FileStream is only available when running in Node!\");\n\t\tfs.readFile(path, encoding, function(err, data) {\n\t\t\tlet is = null;\n\t\t\tif (data !== null) {\n\t\t\t\tis = new CharStream(data, true);\n\t\t\t}\n\t\t\tcallback(err, is);\n\t\t});\n\n\t}\n\n\tconstructor(fileName, encoding, decodeToUnicodeCodePoints) {\n\t\tif(!isNode)\n\t\t\tthrow new Error(\"FileStream is only available when running in Node!\");\n\t\tconst data = fs.readFileSync(fileName, encoding || \"utf-8\" );\n\t\tsuper(data, decodeToUnicodeCodePoints);\n\t\tthis.fileName = fileName;\n\t}\n}\n","/* Copyright (c) 2012-2022 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause license that\n * can be found in the LICENSE.txt file in the project root.\n */\n\nimport CharStream from \"./CharStream.js\";\nimport FileStream from \"./FileStream.js\";\n\n/**\n * Utility functions to create InputStreams from various sources.\n *\n * All returned InputStreams support the full range of Unicode\n * up to U+10FFFF (the default behavior of InputStream only supports\n * code points up to U+FFFF).\n */\nexport default {\n  // Creates an InputStream from a string.\n  fromString: function(str) {\n    return new CharStream(str, true);\n  },\n\n  /**\n   * Asynchronously creates an InputStream from a blob given the\n   * encoding of the bytes in that blob (defaults to 'utf8' if\n   * encoding is null).\n   *\n   * Invokes onLoad(result) on success, onError(error) on\n   * failure.\n   */\n  fromBlob: function(blob, encoding, onLoad, onError) {\n    const reader = new window.FileReader();\n    reader.onload = function(e) {\n      const is = new CharStream(e.target.result, true);\n      onLoad(is);\n    };\n    reader.onerror = onError;\n    reader.readAsText(blob, encoding);\n  },\n\n  /**\n   * Creates an InputStream from a Buffer given the\n   * encoding of the bytes in that buffer (defaults to 'utf8' if\n   * encoding is null).\n   */\n  fromBuffer: function(buffer, encoding) {\n    return new CharStream(buffer.toString(encoding), true);\n  },\n\n  /** Asynchronously creates an InputStream from a file on disk given\n   * the encoding of the bytes in that file (defaults to 'utf8' if\n   * encoding is null).\n   *\n   * Invokes callback(error, result) on completion.\n   */\n  fromPath: function(path, encoding, callback) {\n    FileStream.fromPath(path, encoding, callback);\n  },\n\n  /**\n   * Synchronously creates an InputStream given a path to a file\n   * on disk and the encoding of the bytes in that file (defaults to\n   * 'utf8' if encoding is null).\n   */\n  fromPathSync: function(path, encoding) {\n    return new FileStream(path, encoding);\n  }\n};\n","/* Copyright (c) 2012-2022 The ANTLR Project Contributors. All rights reserved.\n * Use is of this file is governed by the BSD 3-clause license that\n * can be found in the LICENSE.txt file in the project root.\n */\nimport arrayToString from \"./arrayToString.js\";\nimport stringToCharArray from \"./stringToCharArray.js\";\n\nexport default { arrayToString, stringToCharArray };\n","export default function stringToCharArray(str) {\n    let result = new Uint16Array(str.length);\n    for (let i = 0; i < str.length; i++) {\n        result[i] = str.charCodeAt(i);\n    }\n    return result;\n}\n","/* Copyright (c) 2012-2022 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause license that\n * can be found in the LICENSE.txt file in the project root.\n */\n\nimport Token from './Token.js';\nimport Lexer from './Lexer.js';\nimport Interval from './misc/Interval.js';\nimport TokenStream from \"./TokenStream.js\";\n\n/**\n * This implementation of {@link TokenStream} loads tokens from a\n * {@link TokenSource} on-demand, and places the tokens in a buffer to provide\n * access to any previous token by index.\n *\n * <p>\n * This token stream ignores the value of {@link Token//getChannel}. If your\n * parser requires the token stream filter tokens to only those on a particular\n * channel, such as {@link Token//DEFAULT_CHANNEL} or\n * {@link Token//HIDDEN_CHANNEL}, use a filtering token stream such a\n * {@link CommonTokenStream}.</p>\n */\nexport default class BufferedTokenStream extends TokenStream {\n\tconstructor(tokenSource) {\n\n\t\tsuper();\n\t\t// The {@link TokenSource} from which tokens for this stream are fetched.\n\t\tthis.tokenSource = tokenSource;\n\t\t/**\n\t\t * A collection of all tokens fetched from the token source. The list is\n\t\t * considered a complete view of the input once {@link //fetchedEOF} is set\n\t\t * to {@code true}.\n\t\t */\n\t\tthis.tokens = [];\n\n\t\t/**\n\t\t * The index into {@link //tokens} of the current token (next token to\n\t\t * {@link //consume}). {@link //tokens}{@code [}{@link //p}{@code ]} should\n\t\t * be\n\t\t * {@link //LT LT(1)}.\n\t\t *\n\t\t * <p>This field is set to -1 when the stream is first constructed or when\n\t\t * {@link //setTokenSource} is called, indicating that the first token has\n\t\t * not yet been fetched from the token source. For additional information,\n\t\t * see the documentation of {@link IntStream} for a description of\n\t\t * Initializing Methods.</p>\n\t\t */\n\t\tthis.index = -1;\n\n\t\t/**\n\t\t * Indicates whether the {@link Token//EOF} token has been fetched from\n\t\t * {@link //tokenSource} and added to {@link //tokens}. This field improves\n\t\t * performance for the following cases:\n\t\t *\n\t\t * <ul>\n\t\t * <li>{@link //consume}: The lookahead check in {@link //consume} to\n\t\t * prevent\n\t\t * consuming the EOF symbol is optimized by checking the values of\n\t\t * {@link //fetchedEOF} and {@link //p} instead of calling {@link\n\t\t * //LA}.</li>\n\t\t * <li>{@link //fetch}: The check to prevent adding multiple EOF symbols\n\t\t * into\n\t\t * {@link //tokens} is trivial with this field.</li>\n\t\t * <ul>\n\t\t */\n\t\tthis.fetchedEOF = false;\n\t}\n\n\tmark() {\n\t\treturn 0;\n\t}\n\n\trelease(marker) {\n\t\t// no resources to release\n\t}\n\n\treset() {\n\t\tthis.seek(0);\n\t}\n\n\tseek(index) {\n\t\tthis.lazyInit();\n\t\tthis.index = this.adjustSeekIndex(index);\n\t}\n\n\tget size() {\n\t\treturn this.tokens.length;\n\t}\n\n\tget(index) {\n\t\tthis.lazyInit();\n\t\treturn this.tokens[index];\n\t}\n\n\tconsume() {\n\t\tlet skipEofCheck = false;\n\t\tif (this.index >= 0) {\n\t\t\tif (this.fetchedEOF) {\n\t\t\t\t// the last token in tokens is EOF. skip check if p indexes any\n\t\t\t\t// fetched token except the last.\n\t\t\t\tskipEofCheck = this.index < this.tokens.length - 1;\n\t\t\t} else {\n\t\t\t\t// no EOF token in tokens. skip check if p indexes a fetched token.\n\t\t\t\tskipEofCheck = this.index < this.tokens.length;\n\t\t\t}\n\t\t} else {\n\t\t\t// not yet initialized\n\t\t\tskipEofCheck = false;\n\t\t}\n\t\tif (!skipEofCheck && this.LA(1) === Token.EOF) {\n\t\t\tthrow \"cannot consume EOF\";\n\t\t}\n\t\tif (this.sync(this.index + 1)) {\n\t\t\tthis.index = this.adjustSeekIndex(this.index + 1);\n\t\t}\n\t}\n\n\t/**\n\t * Make sure index {@code i} in tokens has a token.\n\t *\n\t * @return {Boolean} {@code true} if a token is located at index {@code i}, otherwise\n\t * {@code false}.\n\t * @see //get(int i)\n\t */\n\tsync(i) {\n\t\tconst n = i - this.tokens.length + 1; // how many more elements we need?\n\t\tif (n > 0) {\n\t\t\tconst fetched = this.fetch(n);\n\t\t\treturn fetched >= n;\n\t\t}\n\t\treturn true;\n\t}\n\n\t/**\n\t * Add {@code n} elements to buffer.\n\t *\n\t * @return {Number} The actual number of elements added to the buffer.\n\t */\n\tfetch(n) {\n\t\tif (this.fetchedEOF) {\n\t\t\treturn 0;\n\t\t}\n\t\tfor (let i = 0; i < n; i++) {\n\t\t\tconst t = this.tokenSource.nextToken();\n\t\t\tt.tokenIndex = this.tokens.length;\n\t\t\tthis.tokens.push(t);\n\t\t\tif (t.type === Token.EOF) {\n\t\t\t\tthis.fetchedEOF = true;\n\t\t\t\treturn i + 1;\n\t\t\t}\n\t\t}\n\t\treturn n;\n\t}\n\n\t// Get all tokens from start..stop inclusively///\n\tgetTokens(start, stop, types) {\n\t\tif (types === undefined) {\n\t\t\ttypes = null;\n\t\t}\n\t\tif (start < 0 || stop < 0) {\n\t\t\treturn null;\n\t\t}\n\t\tthis.lazyInit();\n\t\tconst subset = [];\n\t\tif (stop >= this.tokens.length) {\n\t\t\tstop = this.tokens.length - 1;\n\t\t}\n\t\tfor (let i = start; i < stop; i++) {\n\t\t\tconst t = this.tokens[i];\n\t\t\tif (t.type === Token.EOF) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif (types === null || types.contains(t.type)) {\n\t\t\t\tsubset.push(t);\n\t\t\t}\n\t\t}\n\t\treturn subset;\n\t}\n\n\tLA(i) {\n\t\treturn this.LT(i).type;\n\t}\n\n\tLB(k) {\n\t\tif (this.index - k < 0) {\n\t\t\treturn null;\n\t\t}\n\t\treturn this.tokens[this.index - k];\n\t}\n\n\tLT(k) {\n\t\tthis.lazyInit();\n\t\tif (k === 0) {\n\t\t\treturn null;\n\t\t}\n\t\tif (k < 0) {\n\t\t\treturn this.LB(-k);\n\t\t}\n\t\tconst i = this.index + k - 1;\n\t\tthis.sync(i);\n\t\tif (i >= this.tokens.length) { // return EOF token\n\t\t\t// EOF must be last token\n\t\t\treturn this.tokens[this.tokens.length - 1];\n\t\t}\n\t\treturn this.tokens[i];\n\t}\n\n\t/**\n\t * Allowed derived classes to modify the behavior of operations which change\n\t * the current stream position by adjusting the target token index of a seek\n\t * operation. The default implementation simply returns {@code i}. If an\n\t * exception is thrown in this method, the current stream index should not be\n\t * changed.\n\t *\n\t * <p>For example, {@link CommonTokenStream} overrides this method to ensure\n\t * that\n\t * the seek target is always an on-channel token.</p>\n\t *\n\t * @param {Number} i The target token index.\n\t * @return {Number} The adjusted target token index.\n\t */\n\tadjustSeekIndex(i) {\n\t\treturn i;\n\t}\n\n\tlazyInit() {\n\t\tif (this.index === -1) {\n\t\t\tthis.setup();\n\t\t}\n\t}\n\n\tsetup() {\n\t\tthis.sync(0);\n\t\tthis.index = this.adjustSeekIndex(0);\n\t}\n\n\t// Reset this token stream by setting its token source.///\n\tsetTokenSource(tokenSource) {\n\t\tthis.tokenSource = tokenSource;\n\t\tthis.tokens = [];\n\t\tthis.index = -1;\n\t\tthis.fetchedEOF = false;\n\t}\n\n\t/**\n\t * Given a starting index, return the index of the next token on channel.\n\t * Return i if tokens[i] is on channel. Return -1 if there are no tokens\n\t * on channel between i and EOF.\n\t */\n\tnextTokenOnChannel(i, channel) {\n\t\tthis.sync(i);\n\t\tif (i >= this.tokens.length) {\n\t\t\treturn -1;\n\t\t}\n\t\tlet token = this.tokens[i];\n\t\twhile (token.channel !== this.channel) {\n\t\t\tif (token.type === Token.EOF) {\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t\ti += 1;\n\t\t\tthis.sync(i);\n\t\t\ttoken = this.tokens[i];\n\t\t}\n\t\treturn i;\n\t}\n\n\t/**\n\t * Given a starting index, return the index of the previous token on channel.\n\t * Return i if tokens[i] is on channel. Return -1 if there are no tokens\n\t * on channel between i and 0.\n\t */\n\tpreviousTokenOnChannel(i, channel) {\n\t\twhile (i >= 0 && this.tokens[i].channel !== channel) {\n\t\t\ti -= 1;\n\t\t}\n\t\treturn i;\n\t}\n\n\t/**\n\t * Collect all tokens on specified channel to the right of\n\t * the current token up until we see a token on DEFAULT_TOKEN_CHANNEL or\n\t * EOF. If channel is -1, find any non default channel token.\n\t */\n\tgetHiddenTokensToRight(tokenIndex,\n\t\tchannel) {\n\t\tif (channel === undefined) {\n\t\t\tchannel = -1;\n\t\t}\n\t\tthis.lazyInit();\n\t\tif (tokenIndex < 0 || tokenIndex >= this.tokens.length) {\n\t\t\tthrow \"\" + tokenIndex + \" not in 0..\" + this.tokens.length - 1;\n\t\t}\n\t\tconst nextOnChannel = this.nextTokenOnChannel(tokenIndex + 1, Lexer.DEFAULT_TOKEN_CHANNEL);\n\t\tconst from_ = tokenIndex + 1;\n\t\t// if none onchannel to right, nextOnChannel=-1 so set to = last token\n\t\tconst to = nextOnChannel === -1 ? this.tokens.length - 1 : nextOnChannel;\n\t\treturn this.filterForChannel(from_, to, channel);\n\t}\n\n\t/**\n\t * Collect all tokens on specified channel to the left of\n\t * the current token up until we see a token on DEFAULT_TOKEN_CHANNEL.\n\t * If channel is -1, find any non default channel token.\n\t */\n\tgetHiddenTokensToLeft(tokenIndex,\n\t\tchannel) {\n\t\tif (channel === undefined) {\n\t\t\tchannel = -1;\n\t\t}\n\t\tthis.lazyInit();\n\t\tif (tokenIndex < 0 || tokenIndex >= this.tokens.length) {\n\t\t\tthrow \"\" + tokenIndex + \" not in 0..\" + this.tokens.length - 1;\n\t\t}\n\t\tconst prevOnChannel = this.previousTokenOnChannel(tokenIndex - 1, Lexer.DEFAULT_TOKEN_CHANNEL);\n\t\tif (prevOnChannel === tokenIndex - 1) {\n\t\t\treturn null;\n\t\t}\n\t\t// if none on channel to left, prevOnChannel=-1 then from=0\n\t\tconst from_ = prevOnChannel + 1;\n\t\tconst to = tokenIndex - 1;\n\t\treturn this.filterForChannel(from_, to, channel);\n\t}\n\n\tfilterForChannel(left, right, channel) {\n\t\tconst hidden = [];\n\t\tfor (let i = left; i < right + 1; i++) {\n\t\t\tconst t = this.tokens[i];\n\t\t\tif (channel === -1) {\n\t\t\t\tif (t.channel !== Lexer.DEFAULT_TOKEN_CHANNEL) {\n\t\t\t\t\thidden.push(t);\n\t\t\t\t}\n\t\t\t} else if (t.channel === channel) {\n\t\t\t\thidden.push(t);\n\t\t\t}\n\t\t}\n\t\tif (hidden.length === 0) {\n\t\t\treturn null;\n\t\t}\n\t\treturn hidden;\n\t}\n\n\tgetSourceName() {\n\t\treturn this.tokenSource.getSourceName();\n\t}\n\n\t// Get the text of all tokens in this buffer.///\n\tgetText(interval) {\n\t\tthis.lazyInit();\n\t\tthis.fill();\n\t\tif (!interval) {\n\t\t\tinterval = new Interval(0, this.tokens.length - 1);\n\t\t}\n\t\tlet start = interval.start;\n\t\tif (start instanceof Token) {\n\t\t\tstart = start.tokenIndex;\n\t\t}\n\t\tlet stop = interval.stop;\n\t\tif (stop instanceof Token) {\n\t\t\tstop = stop.tokenIndex;\n\t\t}\n\t\tif (start === null || stop === null || start < 0 || stop < 0) {\n\t\t\treturn \"\";\n\t\t}\n\t\tif (stop >= this.tokens.length) {\n\t\t\tstop = this.tokens.length - 1;\n\t\t}\n\t\tlet s = \"\";\n\t\tfor (let i = start; i < stop + 1; i++) {\n\t\t\tconst t = this.tokens[i];\n\t\t\tif (t.type === Token.EOF) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\ts = s + t.text;\n\t\t}\n\t\treturn s;\n\t}\n\n\t// Get all tokens from lexer until EOF///\n\tfill() {\n\t\tthis.lazyInit();\n\t\t// noinspection StatementWithEmptyBodyJS\n\t\twhile (this.fetch(1000) === 1000);\n\t}\n}\n\nObject.defineProperty(BufferedTokenStream, \"size\", {\n\tget: function() {\n\t\treturn this.tokens.length;\n\t}\n})\n","/* Copyright (c) 2012-2022 The ANTLR Project Contributors. All rights reserved.\n * Use is of this file is governed by the BSD 3-clause license that\n * can be found in the LICENSE.txt file in the project root.\n */\n// this is just to keep meaningful parameter types to Parser\nexport default class TokenStream {}\n\n","/* Copyright (c) 2012-2022 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause license that\n * can be found in the LICENSE.txt file in the project root.\n */\n\n\nimport Token from './Token.js';\nimport BufferedTokenStream from './BufferedTokenStream.js';\n\n/**\n * This class extends {@link BufferedTokenStream} with functionality to filter\n * token streams to tokens on a particular channel (tokens where\n * {@link Token//getChannel} returns a particular value).\n *\n * <p>\n * This token stream provides access to all tokens by index or when calling\n * methods like {@link //getText}. The channel filtering is only used for code\n * accessing tokens via the lookahead methods {@link //LA}, {@link //LT}, and\n * {@link //LB}.</p>\n *\n * <p>\n * By default, tokens are placed on the default channel\n * ({@link Token//DEFAULT_CHANNEL}), but may be reassigned by using the\n * {@code ->channel(HIDDEN)} lexer command, or by using an embedded action to\n * call {@link Lexer//setChannel}.\n * </p>\n *\n * <p>\n * Note: lexer rules which use the {@code ->skip} lexer command or call\n * {@link Lexer//skip} do not produce tokens at all, so input text matched by\n * such a rule will not be available as part of the token stream, regardless of\n * channel.</p>\n */\nexport default class CommonTokenStream extends BufferedTokenStream {\n    constructor(lexer, channel) {\n        super(lexer);\n        this.channel = channel===undefined ? Token.DEFAULT_CHANNEL : channel;\n    }\n\n    adjustSeekIndex(i) {\n        return this.nextTokenOnChannel(i, this.channel);\n    }\n\n    LB(k) {\n        if (k===0 || this.index-k<0) {\n            return null;\n        }\n        let i = this.index;\n        let n = 1;\n        // find k good tokens looking backwards\n        while (n <= k) {\n            // skip off-channel tokens\n            i = this.previousTokenOnChannel(i - 1, this.channel);\n            n += 1;\n        }\n        if (i < 0) {\n            return null;\n        }\n        return this.tokens[i];\n    }\n\n    LT(k) {\n        this.lazyInit();\n        if (k === 0) {\n            return null;\n        }\n        if (k < 0) {\n            return this.LB(-k);\n        }\n        let i = this.index;\n        let n = 1; // we know tokens[pos] is a good one\n        // find k good tokens\n        while (n < k) {\n            // skip off-channel tokens, but make sure to not look past EOF\n            if (this.sync(i + 1)) {\n                i = this.nextTokenOnChannel(i + 1, this.channel);\n            }\n            n += 1;\n        }\n        return this.tokens[i];\n    }\n\n    // Count EOF just once.\n    getNumberOfOnChannelTokens() {\n        let n = 0;\n        this.fill();\n        for (let i =0; i< this.tokens.length;i++) {\n            const t = this.tokens[i];\n            if( t.channel===this.channel) {\n                n += 1;\n            }\n            if( t.type===Token.EOF) {\n                break;\n            }\n        }\n        return n;\n    }\n}\n","/* Copyright (c) 2012-2022 The ANTLR Project Contributors. All rights reserved.\n * Use is of this file is governed by the BSD 3-clause license that\n * can be found in the LICENSE.txt file in the project root.\n */\nimport ParseTreeListener from \"./tree/ParseTreeListener.js\";\n\nexport default class TraceListener extends ParseTreeListener {\n    constructor(parser) {\n        super();\n        this.parser = parser;\n    }\n\n    enterEveryRule(ctx) {\n        console.log(\"enter   \" + this.parser.ruleNames[ctx.ruleIndex] + \", LT(1)=\" + this.parser._input.LT(1).text);\n    }\n\n    visitTerminal(node) {\n        console.log(\"consume \" + node.symbol + \" rule \" + this.parser.ruleNames[this.parser._ctx.ruleIndex]);\n    }\n\n    exitEveryRule(ctx) {\n        console.log(\"exit    \" + this.parser.ruleNames[ctx.ruleIndex] + \", LT(1)=\" + this.parser._input.LT(1).text);\n    }\n}\n","/* Copyright (c) 2012-2022 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause license that\n * can be found in the LICENSE.txt file in the project root.\n */\n\nimport Token from './Token.js';\nimport TerminalNode from './tree/TerminalNode.js';\nimport ErrorNode from './tree/ErrorNode.js';\nimport Recognizer from './Recognizer.js';\nimport DefaultErrorStrategy from './error/DefaultErrorStrategy.js';\nimport ATNDeserializer from './atn/ATNDeserializer.js';\nimport ATNDeserializationOptions from './atn/ATNDeserializationOptions.js';\nimport TraceListener from \"./TraceListener.js\";\n\nexport default class Parser extends Recognizer {\n    /**\n     * this is all the parsing support code essentially; most of it is error\n     * recovery stuff.\n     */\n    constructor(input) {\n        super();\n        // The input stream.\n        this._input = null;\n        /**\n         * The error handling strategy for the parser. The default value is a new\n         * instance of {@link DefaultErrorStrategy}.\n         */\n        this._errHandler = new DefaultErrorStrategy();\n        this._precedenceStack = [];\n        this._precedenceStack.push(0);\n        /**\n         * The {@link ParserRuleContext} object for the currently executing rule.\n         * this is always non-null during the parsing process.\n         */\n        this._ctx = null;\n        /**\n         * Specifies whether or not the parser should construct a parse tree during\n         * the parsing process. The default value is {@code true}.\n         */\n        this.buildParseTrees = true;\n        /**\n         * When {@link //setTrace}{@code (true)} is called, a reference to the\n         * {@link TraceListener} is stored here so it can be easily removed in a\n         * later call to {@link //setTrace}{@code (false)}. The listener itself is\n         * implemented as a parser listener so this field is not directly used by\n         * other parser methods.\n         */\n        this._tracer = null;\n        /**\n         * The list of {@link ParseTreeListener} listeners registered to receive\n         * events during the parse.\n         */\n        this._parseListeners = null;\n        /**\n         * The number of syntax errors reported during parsing. this value is\n         * incremented each time {@link //notifyErrorListeners} is called.\n         */\n        this._syntaxErrors = 0;\n        this.setInputStream(input);\n    }\n\n    // reset the parser's state\n    reset() {\n        if (this._input !== null) {\n            this._input.seek(0);\n        }\n        this._errHandler.reset(this);\n        this._ctx = null;\n        this._syntaxErrors = 0;\n        this.setTrace(false);\n        this._precedenceStack = [];\n        this._precedenceStack.push(0);\n        if (this._interp !== null) {\n            this._interp.reset();\n        }\n    }\n\n    /**\n     * Match current input symbol against {@code ttype}. If the symbol type\n     * matches, {@link ANTLRErrorStrategy//reportMatch} and {@link //consume} are\n     * called to complete the match process.\n     *\n     * <p>If the symbol type does not match,\n     * {@link ANTLRErrorStrategy//recoverInline} is called on the current error\n     * strategy to attempt recovery. If {@link //buildParseTree} is\n     * {@code true} and the token index of the symbol returned by\n     * {@link ANTLRErrorStrategy//recoverInline} is -1, the symbol is added to\n     * the parse tree by calling {@link ParserRuleContext//addErrorNode}.</p>\n     *\n     * @param ttype the token type to match\n     * @return the matched symbol\n     * @throws RecognitionException if the current input symbol did not match\n     * {@code ttype} and the error strategy could not recover from the\n     * mismatched symbol\n     */\n    match(ttype) {\n        let t = this.getCurrentToken();\n        if (t.type === ttype) {\n            this._errHandler.reportMatch(this);\n            this.consume();\n        } else {\n            t = this._errHandler.recoverInline(this);\n            if (this.buildParseTrees && t.tokenIndex === -1) {\n                // we must have conjured up a new token during single token\n                // insertion\n                // if it's not the current symbol\n                this._ctx.addErrorNode(t);\n            }\n        }\n        return t;\n    }\n\n    /**\n     * Match current input symbol as a wildcard. If the symbol type matches\n     * (i.e. has a value greater than 0), {@link ANTLRErrorStrategy//reportMatch}\n     * and {@link //consume} are called to complete the match process.\n     *\n     * <p>If the symbol type does not match,\n     * {@link ANTLRErrorStrategy//recoverInline} is called on the current error\n     * strategy to attempt recovery. If {@link //buildParseTree} is\n     * {@code true} and the token index of the symbol returned by\n     * {@link ANTLRErrorStrategy//recoverInline} is -1, the symbol is added to\n     * the parse tree by calling {@link ParserRuleContext//addErrorNode}.</p>\n     *\n     * @return the matched symbol\n     * @throws RecognitionException if the current input symbol did not match\n     * a wildcard and the error strategy could not recover from the mismatched\n     * symbol\n     */\n    matchWildcard() {\n        let t = this.getCurrentToken();\n        if (t.type > 0) {\n            this._errHandler.reportMatch(this);\n            this.consume();\n        } else {\n            t = this._errHandler.recoverInline(this);\n            if (this.buildParseTrees && t.tokenIndex === -1) {\n                // we must have conjured up a new token during single token\n                // insertion\n                // if it's not the current symbol\n                this._ctx.addErrorNode(t);\n            }\n        }\n        return t;\n    }\n\n    getParseListeners() {\n        return this._parseListeners || [];\n    }\n\n    /**\n     * Registers {@code listener} to receive events during the parsing process.\n     *\n     * <p>To support output-preserving grammar transformations (including but not\n     * limited to left-recursion removal, automated left-factoring, and\n     * optimized code generation), calls to listener methods during the parse\n     * may differ substantially from calls made by\n     * {@link ParseTreeWalker//DEFAULT} used after the parse is complete. In\n     * particular, rule entry and exit events may occur in a different order\n     * during the parse than after the parser. In addition, calls to certain\n     * rule entry methods may be omitted.</p>\n     *\n     * <p>With the following specific exceptions, calls to listener events are\n     * <em>deterministic</em>, i.e. for identical input the calls to listener\n     * methods will be the same.</p>\n     *\n     * <ul>\n     * <li>Alterations to the grammar used to generate code may change the\n     * behavior of the listener calls.</li>\n     * <li>Alterations to the command line options passed to ANTLR 4 when\n     * generating the parser may change the behavior of the listener calls.</li>\n     * <li>Changing the version of the ANTLR Tool used to generate the parser\n     * may change the behavior of the listener calls.</li>\n     * </ul>\n     *\n     * @param listener the listener to add\n     *\n     * @throws NullPointerException if {@code} listener is {@code null}\n     */\n    addParseListener(listener) {\n        if (listener === null) {\n            throw \"listener\";\n        }\n        if (this._parseListeners === null) {\n            this._parseListeners = [];\n        }\n        this._parseListeners.push(listener);\n    }\n\n    /**\n     * Remove {@code listener} from the list of parse listeners.\n     *\n     * <p>If {@code listener} is {@code null} or has not been added as a parse\n     * listener, this method does nothing.</p>\n     * @param listener the listener to remove\n     */\n    removeParseListener(listener) {\n        if (this._parseListeners !== null) {\n            const idx = this._parseListeners.indexOf(listener);\n            if (idx >= 0) {\n                this._parseListeners.splice(idx, 1);\n            }\n            if (this._parseListeners.length === 0) {\n                this._parseListeners = null;\n            }\n        }\n    }\n\n    // Remove all parse listeners.\n    removeParseListeners() {\n        this._parseListeners = null;\n    }\n\n    // Notify any parse listeners of an enter rule event.\n    triggerEnterRuleEvent() {\n        if (this._parseListeners !== null) {\n            const ctx = this._ctx;\n            this._parseListeners.forEach(function (listener) {\n                listener.enterEveryRule(ctx);\n                ctx.enterRule(listener);\n            });\n        }\n    }\n\n    /**\n     * Notify any parse listeners of an exit rule event.\n     * @see //addParseListener\n     */\n    triggerExitRuleEvent() {\n        if (this._parseListeners !== null) {\n            // reverse order walk of listeners\n            const ctx = this._ctx;\n            this._parseListeners.slice(0).reverse().forEach(function (listener) {\n                ctx.exitRule(listener);\n                listener.exitEveryRule(ctx);\n            });\n        }\n    }\n\n    getTokenFactory() {\n        return this._input.tokenSource._factory;\n    }\n\n    // Tell our token source and error strategy about a new way to create tokens.\n    setTokenFactory(factory) {\n        this._input.tokenSource._factory = factory;\n    }\n\n    /**\n     * The ATN with bypass alternatives is expensive to create so we create it\n     * lazily.\n     *\n     * @throws UnsupportedOperationException if the current parser does not\n     * implement the {@link //getSerializedATN()} method.\n     */\n    getATNWithBypassAlts() {\n        const serializedAtn = this.getSerializedATN();\n        if (serializedAtn === null) {\n            throw \"The current parser does not support an ATN with bypass alternatives.\";\n        }\n        let result = this.bypassAltsAtnCache[serializedAtn];\n        if (result === null) {\n            const deserializationOptions = new ATNDeserializationOptions();\n            deserializationOptions.generateRuleBypassTransitions = true;\n            result = new ATNDeserializer(deserializationOptions)\n                .deserialize(serializedAtn);\n            this.bypassAltsAtnCache[serializedAtn] = result;\n        }\n        return result;\n    }\n\n    getInputStream() {\n        return this.getTokenStream();\n    }\n\n    setInputStream(input) {\n        this.setTokenStream(input);\n    }\n\n    getTokenStream() {\n        return this._input;\n    }\n\n    // Set the token stream and reset the parser.\n    setTokenStream(input) {\n        this._input = null;\n        this.reset();\n        this._input = input;\n    }\n\n    /**\n\t * Gets the number of syntax errors reported during parsing. This value is\n\t * incremented each time {@link //notifyErrorListeners} is called.\t \n\t */\n    get syntaxErrorsCount() {\n        return this._syntaxErrors;\n    }\n\n\n    /**\n     * Match needs to return the current input symbol, which gets put\n     * into the label for the associated token ref; e.g., x=ID.\n     */\n    getCurrentToken() {\n        return this._input.LT(1);\n    }\n\n    notifyErrorListeners(msg, offendingToken, err) {\n        offendingToken = offendingToken || null;\n        err = err || null;\n        if (offendingToken === null) {\n            offendingToken = this.getCurrentToken();\n        }\n        this._syntaxErrors += 1;\n        const line = offendingToken.line;\n        const column = offendingToken.column;\n        const listener = this.getErrorListenerDispatch();\n        listener.syntaxError(this, offendingToken, line, column, msg, err);\n    }\n\n    /**\n     * Consume and return the {@linkplain //getCurrentToken current symbol}.\n     *\n     * <p>E.g., given the following input with {@code A} being the current\n     * lookahead symbol, this function moves the cursor to {@code B} and returns\n     * {@code A}.</p>\n     *\n     * <pre>\n     * A B\n     * ^\n     * </pre>\n     *\n     * If the parser is not in error recovery mode, the consumed symbol is added\n     * to the parse tree using {@link ParserRuleContext//addChild(Token)}, and\n     * {@link ParseTreeListener//visitTerminal} is called on any parse listeners.\n     * If the parser <em>is</em> in error recovery mode, the consumed symbol is\n     * added to the parse tree using\n     * {@link ParserRuleContext//addErrorNode(Token)}, and\n     * {@link ParseTreeListener//visitErrorNode} is called on any parse\n     * listeners.\n     */\n    consume() {\n        const o = this.getCurrentToken();\n        if (o.type !== Token.EOF) {\n            this.getInputStream().consume();\n        }\n        const hasListener = this._parseListeners !== null && this._parseListeners.length > 0;\n        if (this.buildParseTrees || hasListener) {\n            let node;\n            if (this._errHandler.inErrorRecoveryMode(this)) {\n                node = this._ctx.addErrorNode(o);\n            } else {\n                node = this._ctx.addTokenNode(o);\n            }\n            node.invokingState = this.state;\n            if (hasListener) {\n                this._parseListeners.forEach(function (listener) {\n                    if (node instanceof ErrorNode || (node.isErrorNode !== undefined && node.isErrorNode())) {\n                        listener.visitErrorNode(node);\n                    } else if (node instanceof TerminalNode) {\n                        listener.visitTerminal(node);\n                    }\n                });\n            }\n        }\n        return o;\n    }\n\n    addContextToParseTree() {\n        // add current context to parent if we have a parent\n        if (this._ctx.parentCtx !== null) {\n            this._ctx.parentCtx.addChild(this._ctx);\n        }\n    }\n\n    /**\n     * Always called by generated parsers upon entry to a rule. Access field\n     * {@link //_ctx} get the current context.\n     */\n    enterRule(localctx, state, ruleIndex) {\n        this.state = state;\n        this._ctx = localctx;\n        this._ctx.start = this._input.LT(1);\n        if (this.buildParseTrees) {\n            this.addContextToParseTree();\n        }\n        this.triggerEnterRuleEvent();\n    }\n\n    exitRule() {\n        this._ctx.stop = this._input.LT(-1);\n        // trigger event on _ctx, before it reverts to parent\n        this.triggerExitRuleEvent();\n        this.state = this._ctx.invokingState;\n        this._ctx = this._ctx.parentCtx;\n    }\n\n    enterOuterAlt(localctx, altNum) {\n        localctx.setAltNumber(altNum);\n        // if we have new localctx, make sure we replace existing ctx\n        // that is previous child of parse tree\n        if (this.buildParseTrees && this._ctx !== localctx) {\n            if (this._ctx.parentCtx !== null) {\n                this._ctx.parentCtx.removeLastChild();\n                this._ctx.parentCtx.addChild(localctx);\n            }\n        }\n        this._ctx = localctx;\n    }\n\n    /**\n     * Get the precedence level for the top-most precedence rule.\n     *\n     * @return The precedence level for the top-most precedence rule, or -1 if\n     * the parser context is not nested within a precedence rule.\n     */\n    getPrecedence() {\n        if (this._precedenceStack.length === 0) {\n            return -1;\n        } else {\n            return this._precedenceStack[this._precedenceStack.length - 1];\n        }\n    }\n\n    enterRecursionRule(localctx, state, ruleIndex, precedence) {\n        this.state = state;\n        this._precedenceStack.push(precedence);\n        this._ctx = localctx;\n        this._ctx.start = this._input.LT(1);\n        this.triggerEnterRuleEvent(); // simulates rule entry for left-recursive rules\n    }\n\n    // Like {@link //enterRule} but for recursive rules.\n    pushNewRecursionContext(localctx, state, ruleIndex) {\n        const previous = this._ctx;\n        previous.parentCtx = localctx;\n        previous.invokingState = state;\n        previous.stop = this._input.LT(-1);\n\n        this._ctx = localctx;\n        this._ctx.start = previous.start;\n        if (this.buildParseTrees) {\n            this._ctx.addChild(previous);\n        }\n        this.triggerEnterRuleEvent(); // simulates rule entry for left-recursive rules\n    }\n\n    unrollRecursionContexts(parentCtx) {\n        this._precedenceStack.pop();\n        this._ctx.stop = this._input.LT(-1);\n        const retCtx = this._ctx; // save current ctx (return value)\n        // unroll so _ctx is as it was before call to recursive method\n        const parseListeners = this.getParseListeners();\n        if (parseListeners !== null && parseListeners.length > 0) {\n            while (this._ctx !== parentCtx) {\n                this.triggerExitRuleEvent();\n                this._ctx = this._ctx.parentCtx;\n            }\n        } else {\n            this._ctx = parentCtx;\n        }\n        // hook into tree\n        retCtx.parentCtx = parentCtx;\n        if (this.buildParseTrees && parentCtx !== null) {\n            // add return ctx into invoking rule's tree\n            parentCtx.addChild(retCtx);\n        }\n    }\n\n    getInvokingContext(ruleIndex) {\n        let ctx = this._ctx;\n        while (ctx !== null) {\n            if (ctx.ruleIndex === ruleIndex) {\n                return ctx;\n            }\n            ctx = ctx.parentCtx;\n        }\n        return null;\n    }\n\n    precpred(localctx, precedence) {\n        return precedence >= this._precedenceStack[this._precedenceStack.length - 1];\n    }\n\n    inContext(context) {\n        // TODO: useful in parser?\n        return false;\n    }\n\n    /**\n     * Checks whether or not {@code symbol} can follow the current state in the\n     * ATN. The behavior of this method is equivalent to the following, but is\n     * implemented such that the complete context-sensitive follow set does not\n     * need to be explicitly constructed.\n     *\n     * <pre>\n     * return getExpectedTokens().contains(symbol);\n     * </pre>\n     *\n     * @param symbol the symbol type to check\n     * @return {@code true} if {@code symbol} can follow the current state in\n     * the ATN, otherwise {@code false}.\n     */\n    isExpectedToken(symbol) {\n        const atn = this._interp.atn;\n        let ctx = this._ctx;\n        const s = atn.states[this.state];\n        let following = atn.nextTokens(s);\n        if (following.contains(symbol)) {\n            return true;\n        }\n        if (!following.contains(Token.EPSILON)) {\n            return false;\n        }\n        while (ctx !== null && ctx.invokingState >= 0 && following.contains(Token.EPSILON)) {\n            const invokingState = atn.states[ctx.invokingState];\n            const rt = invokingState.transitions[0];\n            following = atn.nextTokens(rt.followState);\n            if (following.contains(symbol)) {\n                return true;\n            }\n            ctx = ctx.parentCtx;\n        }\n        if (following.contains(Token.EPSILON) && symbol === Token.EOF) {\n            return true;\n        } else {\n            return false;\n        }\n    }\n\n    /**\n     * Computes the set of input symbols which could follow the current parser\n     * state and context, as given by {@link //getState} and {@link //getContext},\n     * respectively.\n     *\n     * @see ATN//getExpectedTokens(int, RuleContext)\n     */\n    getExpectedTokens() {\n        return this._interp.atn.getExpectedTokens(this.state, this._ctx);\n    }\n\n    getExpectedTokensWithinCurrentRule() {\n        const atn = this._interp.atn;\n        const s = atn.states[this.state];\n        return atn.nextTokens(s);\n    }\n\n    // Get a rule's index (i.e., {@code RULE_ruleName} field) or -1 if not found.\n    getRuleIndex(ruleName) {\n        const ruleIndex = this.getRuleIndexMap()[ruleName];\n        if (ruleIndex !== null) {\n            return ruleIndex;\n        } else {\n            return -1;\n        }\n    }\n\n    /**\n     * Return List&lt;String&gt; of the rule names in your parser instance\n     * leading up to a call to the current rule. You could override if\n     * you want more details such as the file/line info of where\n     * in the ATN a rule is invoked.\n     *\n     * this is very useful for error messages.\n     */\n    getRuleInvocationStack(p) {\n        p = p || null;\n        if (p === null) {\n            p = this._ctx;\n        }\n        const stack = [];\n        while (p !== null) {\n            // compute what follows who invoked us\n            const ruleIndex = p.ruleIndex;\n            if (ruleIndex < 0) {\n                stack.push(\"n/a\");\n            } else {\n                stack.push(this.ruleNames[ruleIndex]);\n            }\n            p = p.parentCtx;\n        }\n        return stack;\n    }\n\n    // For debugging and other purposes.\n    getDFAStrings() {\n        return this._interp.decisionToDFA.toString();\n    }\n\n    // For debugging and other purposes.\n    dumpDFA() {\n        let seenOne = false;\n        for (let i = 0; i < this._interp.decisionToDFA.length; i++) {\n            const dfa = this._interp.decisionToDFA[i];\n            if (dfa.states.length > 0) {\n                if (seenOne) {\n                    console.log();\n                }\n                this.printer.println(\"Decision \" + dfa.decision + \":\");\n                this.printer.print(dfa.toString(this.literalNames, this.symbolicNames));\n                seenOne = true;\n            }\n        }\n    }\n\n    /*\n        \"\t\t\tprinter = function() {\\r\\n\" +\n        \"\t\t\t\tthis.println = function(s) { document.getElementById('output') += s + '\\\\n'; }\\r\\n\" +\n        \"\t\t\t\tthis.print = function(s) { document.getElementById('output') += s; }\\r\\n\" +\n        \"\t\t\t};\\r\\n\" +\n        */\n    getSourceName() {\n        return this._input.sourceName;\n    }\n\n    /**\n     * During a parse is sometimes useful to listen in on the rule entry and exit\n     * events as well as token matches. this is for quick and dirty debugging.\n     */\n    setTrace(trace) {\n        if (!trace) {\n            this.removeParseListener(this._tracer);\n            this._tracer = null;\n        } else {\n            if (this._tracer !== null) {\n                this.removeParseListener(this._tracer);\n            }\n            this._tracer = new TraceListener(this);\n            this.addParseListener(this._tracer);\n        }\n    }\n}\n\n/**\n * this field maps from the serialized ATN string to the deserialized {@link\n    * ATN} with\n * bypass alternatives.\n *\n * @see ATNDeserializationOptions//isGenerateRuleBypassTransitions()\n */\nParser.bypassAltsAtnCache = {};\n","/* Copyright (c) 2012-2022 The ANTLR Project Contributors. All rights reserved.\n * Use is of this file is governed by the BSD 3-clause license that\n * can be found in the LICENSE.txt file in the project root.\n */\nimport Interval from \"../misc/Interval.js\";\nimport Token from '../Token.js';\nimport TerminalNode from \"./TerminalNode.js\";\n\nexport default class TerminalNodeImpl extends TerminalNode {\n    constructor(symbol) {\n        super();\n        this.parentCtx = null;\n        this.symbol = symbol;\n    }\n\n    getChild(i) {\n        return null;\n    }\n\n    getSymbol() {\n        return this.symbol;\n    }\n\n    getParent() {\n        return this.parentCtx;\n    }\n\n    getPayload() {\n        return this.symbol;\n    }\n\n    getSourceInterval() {\n        if (this.symbol === null) {\n            return Interval.INVALID_INTERVAL;\n        }\n        const tokenIndex = this.symbol.tokenIndex;\n        return new Interval(tokenIndex, tokenIndex);\n    }\n\n    getChildCount() {\n        return 0;\n    }\n\n    accept(visitor) {\n        return visitor.visitTerminal(this);\n    }\n\n    getText() {\n        return this.symbol.text;\n    }\n\n    toString() {\n        if (this.symbol.type === Token.EOF) {\n            return \"<EOF>\";\n        } else {\n            return this.symbol.text;\n        }\n    }\n}\n\n","/* Copyright (c) 2012-2022 The ANTLR Project Contributors. All rights reserved.\n * Use is of this file is governed by the BSD 3-clause license that\n * can be found in the LICENSE.txt file in the project root.\n */\n/**\n * Represents a token that was consumed during resynchronization\n * rather than during a valid match operation. For example,\n * we will create this kind of a node during single token insertion\n * and deletion as well as during \"consume until error recovery set\"\n * upon no viable alternative exceptions.\n */\nimport TerminalNodeImpl from \"./TerminalNodeImpl.js\";\n\nexport default class ErrorNodeImpl extends TerminalNodeImpl {\n    constructor(token) {\n        super(token);\n    }\n\n    isErrorNode() {\n        return true;\n    }\n\n    accept(visitor) {\n        return visitor.visitErrorNode(this);\n    }\n}\n","/* Copyright (c) 2012-2022 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause license that\n * can be found in the LICENSE.txt file in the project root.\n */\n\nimport RuleContext from './RuleContext.js';\nimport TerminalNode from '../tree/TerminalNode.js';\nimport TerminalNodeImpl from '../tree/TerminalNodeImpl.js';\nimport ErrorNodeImpl from '../tree/ErrorNodeImpl.js';\nimport Interval from \"../misc/Interval.js\";\n\n/**\n * A rule invocation record for parsing.\n *\n *  Contains all of the information about the current rule not stored in the\n *  RuleContext. It handles parse tree children list, Any ATN state\n *  tracing, and the default values available for rule indications:\n *  start, stop, rule index, current alt number, current\n *  ATN state.\n *\n *  Subclasses made for each rule and grammar track the parameters,\n *  return values, locals, and labels specific to that rule. These\n *  are the objects that are returned from rules.\n *\n *  Note text is not an actual field of a rule return value; it is computed\n *  from start and stop using the input stream's toString() method.  I\n *  could add a ctor to this so that we can pass in and store the input\n *  stream, but I'm not sure we want to do that.  It would seem to be undefined\n *  to get the .text property anyway if the rule matches tokens from multiple\n *  input streams.\n *\n *  I do not use getters for fields of objects that are used simply to\n *  group values such as this aggregate.  The getters/setters are there to\n *  satisfy the superclass interface.\n */\nexport default class ParserRuleContext extends RuleContext {\n\n\tconstructor(parent, invokingStateNumber) {\n\t\tsuper(parent, invokingStateNumber);\n\t\t/**\n\t\t * If we are debugging or building a parse tree for a visitor,\n\t\t * we need to track all of the tokens and rule invocations associated\n\t\t * with this rule's context. This is empty for parsing w/o tree constr.\n\t\t * operation because we don't the need to track the details about\n\t\t * how we parse this rule.\n\t\t */\n\t\tthis.children = null;\n\t\tthis.start = null;\n\t\tthis.stop = null;\n\t\t/**\n\t\t * The exception that forced this rule to return. If the rule successfully\n\t\t * completed, this is {@code null}.\n\t\t */\n\t\tthis.exception = null;\n\t}\n\n\t// COPY a ctx (I'm deliberately not using copy constructor)\n\tcopyFrom(ctx) {\n\t\t// from RuleContext\n\t\tthis.parentCtx = ctx.parentCtx;\n\t\tthis.invokingState = ctx.invokingState;\n\t\tthis.children = null;\n\t\tthis.start = ctx.start;\n\t\tthis.stop = ctx.stop;\n\t\t// copy any error nodes to alt label node\n\t\tif(ctx.children) {\n\t\t\tthis.children = [];\n\t\t\t// reset parent pointer for any error nodes\n\t\t\tctx.children.map(function(child) {\n\t\t\t\tif (child instanceof ErrorNodeImpl) {\n\t\t\t\t\tthis.children.push(child);\n\t\t\t\t\tchild.parentCtx = this;\n\t\t\t\t}\n\t\t\t}, this);\n\t\t}\n\t}\n\n\t// Double dispatch methods for listeners\n\tenterRule(listener) {\n\t}\n\n\texitRule(listener) {\n\t}\n\n\t// Does not set parent link; other add methods do that\n\taddChild(child) {\n\t\tif (this.children === null) {\n\t\t\tthis.children = [];\n\t\t}\n\t\tthis.children.push(child);\n\t\treturn child;\n\t}\n\n\t/** Used by enterOuterAlt to toss out a RuleContext previously added as\n\t * we entered a rule. If we have // label, we will need to remove\n\t * generic ruleContext object.\n\t */\n\tremoveLastChild() {\n\t\tif (this.children !== null) {\n\t\t\tthis.children.pop();\n\t\t}\n\t}\n\n\taddTokenNode(token) {\n\t\tconst node = new TerminalNodeImpl(token);\n\t\tthis.addChild(node);\n\t\tnode.parentCtx = this;\n\t\treturn node;\n\t}\n\n\taddErrorNode(badToken) {\n\t\tconst node = new ErrorNodeImpl(badToken);\n\t\tthis.addChild(node);\n\t\tnode.parentCtx = this;\n\t\treturn node;\n\t}\n\n\tgetChild(i, type) {\n\t\ttype = type || null;\n\t\tif (this.children === null || i < 0 || i >= this.children.length) {\n\t\t\treturn null;\n\t\t}\n\t\tif (type === null) {\n\t\t\treturn this.children[i];\n\t\t} else {\n\t\t\tfor(let j=0; j<this.children.length; j++) {\n\t\t\t\tconst child = this.children[j];\n\t\t\t\tif(child instanceof type) {\n\t\t\t\t\tif(i===0) {\n\t\t\t\t\t\treturn child;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ti -= 1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn null;\n\t\t}\n\t}\n\n\tgetToken(ttype, i) {\n\t\tif (this.children === null || i < 0 || i >= this.children.length) {\n\t\t\treturn null;\n\t\t}\n\t\tfor(let j=0; j<this.children.length; j++) {\n\t\t\tconst child = this.children[j];\n\t\t\tif (child instanceof TerminalNode) {\n\t\t\t\tif (child.symbol.type === ttype) {\n\t\t\t\t\tif(i===0) {\n\t\t\t\t\t\treturn child;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ti -= 1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}\n\n\tgetTokens(ttype ) {\n\t\tif (this.children=== null) {\n\t\t\treturn [];\n\t\t} else {\n\t\t\tconst tokens = [];\n\t\t\tfor(let j=0; j<this.children.length; j++) {\n\t\t\t\tconst child = this.children[j];\n\t\t\t\tif (child instanceof TerminalNode) {\n\t\t\t\t\tif (child.symbol.type === ttype) {\n\t\t\t\t\t\ttokens.push(child);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn tokens;\n\t\t}\n\t}\n\n\tgetTypedRuleContext(ctxType, i) {\n\t\treturn this.getChild(i, ctxType);\n\t}\n\n\tgetTypedRuleContexts(ctxType) {\n\t\tif (this.children=== null) {\n\t\t\treturn [];\n\t\t} else {\n\t\t\tconst contexts = [];\n\t\t\tfor(let j=0; j<this.children.length; j++) {\n\t\t\t\tconst child = this.children[j];\n\t\t\t\tif (child instanceof ctxType) {\n\t\t\t\t\tcontexts.push(child);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn contexts;\n\t\t}\n\t}\n\n\tgetChildCount() {\n\t\tif (this.children=== null) {\n\t\t\treturn 0;\n\t\t} else {\n\t\t\treturn this.children.length;\n\t\t}\n\t}\n\n\tgetSourceInterval() {\n\t\tif( this.start === null || this.stop === null) {\n\t\t\treturn Interval.INVALID_INTERVAL;\n\t\t} else {\n\t\t\treturn new Interval(this.start.tokenIndex, this.stop.tokenIndex);\n\t\t}\n\t}\n}\n\nRuleContext.EMPTY = new ParserRuleContext();\n\n\n","import Token from \"./Token.js\";\nimport Interval from \"./misc/Interval.js\";\n\n/**\n * @typedef {import(\"./CommonTokenStream\").default} CommonTokenStream\n * @typedef {Array<RewriteOperation | undefined>} Rewrites\n * @typedef {unknown} Text\n */\n\nexport default class TokenStreamRewriter {\n    // eslint-disable-next-line no-undef\n    static DEFAULT_PROGRAM_NAME = \"default\";\n\n    /**\n     * @param {CommonTokenStream} tokens The token stream to modify\n     */\n    constructor(tokens) {\n        this.tokens = tokens;\n        /** @type {Map<string, Rewrites>} */\n        this.programs = new Map();\n    }\n\n    /**\n     * @returns {CommonTokenStream}\n     */\n    getTokenStream() {\n        return this.tokens;\n    }\n\n    /**\n     * Insert the supplied text after the specified token (or token index)\n     * @param {Token | number} tokenOrIndex\n     * @param {Text} text\n     * @param {string} [programName]\n     */\n    insertAfter(tokenOrIndex, text, programName = TokenStreamRewriter.DEFAULT_PROGRAM_NAME) {\n        /** @type {number} */\n        let index;\n        if (typeof tokenOrIndex === \"number\") {\n            index = tokenOrIndex;\n        } else {\n            index = tokenOrIndex.tokenIndex;\n        }\n\n        // to insert after, just insert before next index (even if past end)\n        let rewrites = this.getProgram(programName);\n        let op = new InsertAfterOp(this.tokens, index, rewrites.length, text);\n        rewrites.push(op);\n    }\n\n    /**\n     * Insert the supplied text before the specified token (or token index)\n     * @param {Token | number} tokenOrIndex\n     * @param {Text} text\n     * @param {string} [programName]\n     */\n    insertBefore(tokenOrIndex, text, programName = TokenStreamRewriter.DEFAULT_PROGRAM_NAME) {\n        /** @type {number} */\n        let index;\n        if (typeof tokenOrIndex === \"number\") {\n            index = tokenOrIndex;\n        } else {\n            index = tokenOrIndex.tokenIndex;\n        }\n\n        const rewrites = this.getProgram(programName);\n        const op = new InsertBeforeOp(this.tokens, index, rewrites.length, text);\n        rewrites.push(op);\n    }\n\n    /**\n     * Replace the specified token with the supplied text\n     * @param {Token | number} tokenOrIndex\n     * @param {Text} text\n     * @param {string} [programName]\n     */\n    replaceSingle(tokenOrIndex, text, programName = TokenStreamRewriter.DEFAULT_PROGRAM_NAME) {\n        this.replace(tokenOrIndex, tokenOrIndex, text, programName);\n    }\n\n    /**\n     * Replace the specified range of tokens with the supplied text\n     * @param {Token | number} from\n     * @param {Token | number} to\n     * @param {Text} text\n     * @param {string} [programName]\n     */\n    replace(from, to, text, programName = TokenStreamRewriter.DEFAULT_PROGRAM_NAME) {\n        if (typeof from !== \"number\") {\n            from = from.tokenIndex;\n        }\n        if (typeof to !== \"number\") {\n            to = to.tokenIndex;\n        }\n        if (from > to || from < 0 || to < 0 || to >= this.tokens.size) {\n            throw new RangeError(`replace: range invalid: ${from}..${to}(size=${this.tokens.size})`);\n        }\n        let rewrites = this.getProgram(programName);\n        let op = new ReplaceOp(this.tokens, from, to, rewrites.length, text);\n        rewrites.push(op);\n    }\n\n    /**\n     * Delete the specified range of tokens\n     * @param {number | Token} from\n     * @param {number | Token} to\n     * @param {string} [programName]\n     */\n    delete(from, to, programName = TokenStreamRewriter.DEFAULT_PROGRAM_NAME) {\n        if (typeof to === \"undefined\") {\n            to = from;\n        }\n        this.replace(from, to, null, programName);\n    }\n\n    /**\n     * @param {string} name\n     * @returns {Rewrites}\n     */\n    getProgram(name) {\n        let is = this.programs.get(name);\n        if (is == null) {\n            is = this.initializeProgram(name);\n        }\n        return is;\n    }\n\n    /**\n     * @param {string} name\n     * @returns {Rewrites}\n     */\n    initializeProgram(name) {\n        const is = [];\n        this.programs.set(name, is);\n        return is;\n    }\n\n    /**\n     * Return the text from the original tokens altered per the instructions given to this rewriter\n     * @param {Interval | string} [intervalOrProgram]\n     * @param {string} [programName]\n     * @returns {string}\n     */\n    getText(intervalOrProgram, programName = TokenStreamRewriter.DEFAULT_PROGRAM_NAME) {\n        let interval;\n        if (intervalOrProgram instanceof Interval) {\n            interval = intervalOrProgram;\n        } else {\n            interval = new Interval(0, this.tokens.size - 1);\n        }\n\n        if (typeof intervalOrProgram === \"string\") {\n            programName = intervalOrProgram;\n        }\n\n        const rewrites = this.programs.get(programName);\n        let start = interval.start;\n        let stop = interval.stop;\n\n        // ensure start/end are in range\n        if (stop > this.tokens.size - 1) {\n            stop = this.tokens.size - 1;\n        }\n        if (start < 0) {\n            start = 0;\n        }\n\n        if (rewrites == null || rewrites.length === 0) {\n            return this.tokens.getText(new Interval(start, stop)); // no instructions to execute\n        }\n\n        let buf = [];\n\n        // First, optimize instruction stream\n        let indexToOp = this.reduceToSingleOperationPerIndex(rewrites);\n\n        // Walk buffer, executing instructions and emitting tokens\n        let i = start;\n        while (i <= stop && i < this.tokens.size) {\n            let op = indexToOp.get(i);\n            indexToOp.delete(i); // remove so any left have index size-1\n            let t = this.tokens.get(i);\n            if (op == null) {\n                // no operation at that index, just dump token\n                if (t.type !== Token.EOF) {\n                    buf.push(String(t.text));\n                }\n                i++; // move to next token\n            }\n            else {\n                i = op.execute(buf); // execute operation and skip\n            }\n        }\n\n        // include stuff after end if it's last index in buffer\n        // So, if they did an insertAfter(lastValidIndex, \"foo\"), include\n        // foo if end==lastValidIndex.\n        if (stop === this.tokens.size - 1) {\n            // Scan any remaining operations after last token\n            // should be included (they will be inserts).\n            for (const op of indexToOp.values()) {\n                if (op.index >= this.tokens.size - 1) {\n                    buf.push(op.text.toString());\n                }\n            }\n        }\n\n        return buf.join(\"\");\n    }\n\n    /**\n     * @param {Rewrites} rewrites\n     * @returns {Map<number, RewriteOperation>} a map from token index to operation\n     */\n    reduceToSingleOperationPerIndex(rewrites) {\n        // WALK REPLACES\n        for (let i = 0; i < rewrites.length; i++) {\n            let op = rewrites[i];\n            if (op == null) {\n                continue;\n            }\n            if (!(op instanceof ReplaceOp)) {\n                continue;\n            }\n            let rop = op;\n            // Wipe prior inserts within range\n            let inserts = this.getKindOfOps(rewrites, InsertBeforeOp, i);\n            for (let iop of inserts) {\n                if (iop.index === rop.index) {\n                    // E.g., insert before 2, delete 2..2; update replace\n                    // text to include insert before, kill insert\n                    rewrites[iop.instructionIndex] = undefined;\n                    rop.text = iop.text.toString() + (rop.text != null ? rop.text.toString() : \"\");\n                }\n                else if (iop.index > rop.index && iop.index <= rop.lastIndex) {\n                    // delete insert as it's a no-op.\n                    rewrites[iop.instructionIndex] = undefined;\n                }\n            }\n            // Drop any prior replaces contained within\n            let prevReplaces = this.getKindOfOps(rewrites, ReplaceOp, i);\n            for (let prevRop of prevReplaces) {\n                if (prevRop.index >= rop.index && prevRop.lastIndex <= rop.lastIndex) {\n                    // delete replace as it's a no-op.\n                    rewrites[prevRop.instructionIndex] = undefined;\n                    continue;\n                }\n                // throw exception unless disjoint or identical\n                let disjoint =\n                    prevRop.lastIndex < rop.index || prevRop.index > rop.lastIndex;\n                // Delete special case of replace (text==null):\n                // D.i-j.u D.x-y.v\t| boundaries overlap\tcombine to max(min)..max(right)\n                if (prevRop.text == null && rop.text == null && !disjoint) {\n                    rewrites[prevRop.instructionIndex] = undefined; // kill first delete\n                    rop.index = Math.min(prevRop.index, rop.index);\n                    rop.lastIndex = Math.max(prevRop.lastIndex, rop.lastIndex);\n                }\n                else if (!disjoint) {\n                    throw new Error(`replace op boundaries of ${rop} overlap with previous ${prevRop}`);\n                }\n            }\n        }\n\n        // WALK INSERTS\n        for (let i = 0; i < rewrites.length; i++) {\n            let op = rewrites[i];\n            if (op == null) {\n                continue;\n            }\n            if (!(op instanceof InsertBeforeOp)) {\n                continue;\n            }\n            let iop = op;\n            // combine current insert with prior if any at same index\n            let prevInserts = this.getKindOfOps(rewrites, InsertBeforeOp, i);\n            for (let prevIop of prevInserts) {\n                if (prevIop.index === iop.index) {\n                    if (prevIop instanceof InsertAfterOp) {\n                        iop.text = this.catOpText(prevIop.text, iop.text);\n                        rewrites[prevIop.instructionIndex] = undefined;\n                    }\n                    else if (prevIop instanceof InsertBeforeOp) { // combine objects\n                        // convert to strings...we're in process of toString'ing\n                        // whole token buffer so no lazy eval issue with any templates\n                        iop.text = this.catOpText(iop.text, prevIop.text);\n                        // delete redundant prior insert\n                        rewrites[prevIop.instructionIndex] = undefined;\n                    }\n                }\n            }\n            // look for replaces where iop.index is in range; error\n            let prevReplaces = this.getKindOfOps(rewrites, ReplaceOp, i);\n            for (let rop of prevReplaces) {\n                if (iop.index === rop.index) {\n                    rop.text = this.catOpText(iop.text, rop.text);\n                    rewrites[i] = undefined;\t// delete current insert\n                    continue;\n                }\n                if (iop.index >= rop.index && iop.index <= rop.lastIndex) {\n                    throw new Error(`insert op ${iop} within boundaries of previous ${rop}`);\n                }\n            }\n        }\n\n        /** @type {Map<number, RewriteOperation>} */\n        let m = new Map();\n        for (let op of rewrites) {\n            if (op == null) {\n                // ignore deleted ops\n                continue;\n            }\n            if (m.get(op.index) != null) {\n                throw new Error(\"should only be one op per index\");\n            }\n            m.set(op.index, op);\n        }\n        return m;\n    }\n\n    /**\n     * @param {Text} a\n     * @param {Text} b\n     * @returns {string}\n     */\n    catOpText(a, b) {\n        let x = \"\";\n        let y = \"\";\n        if (a != null) {\n            x = a.toString();\n        }\n        if (b != null) {\n            y = b.toString();\n        }\n        return x + y;\n    }\n\n    /**\n     * Get all operations before an index of a particular kind\n     * @param {Rewrites} rewrites\n     * @param {any} kind\n     * @param {number} before\n     */\n    getKindOfOps(rewrites, kind, before) {\n        return rewrites.slice(0, before).filter(op => op && op instanceof kind);\n    }\n}\n\nclass RewriteOperation {\n    /**\n     * @param {CommonTokenStream} tokens\n     * @param {number} index\n     * @param {number} instructionIndex\n     * @param {Text} text\n     */\n    constructor(tokens, index, instructionIndex, text) {\n        this.tokens = tokens;\n        this.instructionIndex = instructionIndex;\n        this.index = index;\n        this.text = text === undefined ? \"\" : text;\n    }\n\n    toString() {\n        let opName = this.constructor.name;\n        const $index = opName.indexOf(\"$\");\n        opName = opName.substring($index + 1, opName.length);\n        return \"<\" + opName + \"@\" + this.tokens.get(this.index) +\n            \":\\\"\" + this.text + \"\\\">\";\n    }\n}\n\nclass InsertBeforeOp extends RewriteOperation {\n    /**\n     * @param {CommonTokenStream} tokens\n     * @param {number} index\n     * @param {number} instructionIndex\n     * @param {Text} text\n     */\n    constructor(tokens, index, instructionIndex, text) {\n        super(tokens, index, instructionIndex, text);\n    }\n\n    /**\n     * @param {string[]} buf\n     * @returns {number} the index of the next token to operate on\n     */\n    execute(buf) {\n        if (this.text) {\n            buf.push(this.text.toString());\n        }\n        \n        if (this.tokens.get(this.index).type !== Token.EOF) {\n            buf.push(String(this.tokens.get(this.index).text));\n        }\n        return this.index + 1;\n    }\n}\n\nclass InsertAfterOp extends InsertBeforeOp {\n    /**\n     * @param {CommonTokenStream} tokens\n     * @param {number} index\n     * @param {number} instructionIndex\n     * @param {Text} text\n     */\n    constructor(tokens, index, instructionIndex, text) {\n        super(tokens, index + 1, instructionIndex, text); // insert after is insert before index+1\n    }\n}\n\nclass ReplaceOp extends RewriteOperation {\n    /**\n     * @param {CommonTokenStream} tokens\n     * @param {number} from\n     * @param {number} to\n     * @param {number} instructionIndex\n     * @param {Text} text\n     */\n    constructor(tokens, from, to, instructionIndex, text) {\n        super(tokens, from, instructionIndex, text);\n        this.lastIndex = to;\n    }\n\n    /**\n     * @param {string[]} buf\n     * @returns {number} the index of the next token to operate on\n     */\n    execute(buf) {\n        if (this.text) {\n            buf.push(this.text.toString());\n        }\n        return this.lastIndex + 1;\n    }\n\n    toString() {\n        if (this.text == null) {\n            return \"<DeleteOp@\" + this.tokens.get(this.index) +\n                \"..\" + this.tokens.get(this.lastIndex) + \">\";\n        }\n        return \"<ReplaceOp@\" + this.tokens.get(this.index) +\n            \"..\" + this.tokens.get(this.lastIndex) + \":\\\"\" + this.text + \"\\\">\";\n    }\n}\n","/* Copyright (c) 2012-2022 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause license that\n * can be found in the LICENSE.txt file in the project root.\n */\nimport { default as atn } from './atn/index.js';\nimport { default as dfa } from './dfa/index.js';\nimport { default as context } from './context/index.js';\nimport { default as misc } from './misc/index.js';\nimport { default as tree } from './tree/index.js';\nimport { default as error } from './error/index.js';\nimport { default as CharStreams } from './CharStreams.js';\nimport { default as Utils } from './utils/index.js';\n\nimport Token from './Token.js';\nimport CommonToken from './CommonToken.js';\nimport InputStream from './InputStream.js';\nimport CharStream from './InputStream.js';\nimport CommonTokenStream from './CommonTokenStream.js';\nimport Lexer from './Lexer.js';\nimport Parser from './Parser.js';\n\nimport RuleContext from './context/RuleContext.js';\nimport ParserRuleContext from './context/ParserRuleContext.js';\nimport ATN from './atn/ATN.js';\nimport PredictionMode from './atn/PredictionMode.js';\nimport LL1Analyzer from './atn/LL1Analyzer.js';\nimport ATNDeserializer from './atn/ATNDeserializer.js';\nimport LexerATNSimulator from './atn/LexerATNSimulator.js';\nimport ParserATNSimulator from './atn/ParserATNSimulator.js';\nimport PredictionContextCache from './atn/PredictionContextCache.js';\nimport DFA from \"./dfa/DFA.js\";\nimport RecognitionException from \"./error/RecognitionException.js\";\nimport FailedPredicateException from \"./error/FailedPredicateException.js\";\nimport NoViableAltException from \"./error/NoViableAltException.js\";\nimport BailErrorStrategy from \"./error/BailErrorStrategy.js\";\nimport Interval from './misc/Interval.js';\nimport IntervalSet from './misc/IntervalSet.js';\nimport ParseTreeListener from \"./tree/ParseTreeListener.js\";\nimport ParseTreeVisitor from \"./tree/ParseTreeVisitor.js\";\nimport ParseTreeWalker from \"./tree/ParseTreeWalker.js\";\nimport ErrorListener from \"./error/ErrorListener.js\"\nimport DiagnosticErrorListener from \"./error/DiagnosticErrorListener.js\"\nimport RuleNode from \"./tree/RuleNode.js\"\nimport TerminalNode from \"./tree/TerminalNode.js\"\nimport arrayToString from \"./utils/arrayToString.js\"\nimport TokenStreamRewriter from './TokenStreamRewriter.js';\n\nexport default {\n    atn, dfa, context, misc, tree, error, Token, CommonToken, CharStreams, CharStream, InputStream, CommonTokenStream, Lexer, Parser,\n    ParserRuleContext, Interval, IntervalSet, LL1Analyzer, Utils, TokenStreamRewriter\n}\n\nexport {\n    Token, CommonToken, CharStreams, CharStream, InputStream, CommonTokenStream, Lexer, Parser,\n    RuleNode, TerminalNode, ParseTreeWalker, RuleContext, ParserRuleContext, Interval, IntervalSet,\n    PredictionMode, LL1Analyzer, ParseTreeListener, ParseTreeVisitor, ATN, ATNDeserializer, PredictionContextCache, LexerATNSimulator, ParserATNSimulator, DFA,\n    RecognitionException, NoViableAltException, FailedPredicateException, ErrorListener, DiagnosticErrorListener, BailErrorStrategy,\n    arrayToString\n}\n"],"names":["__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","exports","module","__webpack_modules__","d","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","r","Symbol","toStringTag","value","Token","_classCallCheck","this","source","type","channel","start","stop","tokenIndex","line","column","_text","set","text","equalArrays","a","b","Array","isArray","length","i","equals","INVALID_TYPE","EPSILON","MIN_USER_TOKEN_TYPE","EOF","DEFAULT_CHANNEL","HIDDEN_CHANNEL","StringSeedHashCode","Math","round","random","pow","stringHashCode","h1b","k1","_typeof","toString","remainder","bytes","h1","c1","c2","charCodeAt","HashCode","count","hash","arguments","update","apply","k","updateHashCode","console","log","finish","standardHashCodeFunction","hashCode","standardEqualsFunction","valueToString","v","arrayToString","map","join","HASH_KEY_PREFIX","HashSet","hashFunction","equalsFunction","data","values","push","_this","keys","filter","startsWith","flatMap","_this2","reduce","accum","item","SemanticContext","_createClass","parser","outerContext","NONE","result","AND","opnds","OR","_SemanticContext","_inherits","_super","_createSuper","operands","add","precedencePredicates","filterPrecedencePredicates","reduced","p","precedence","from","other","evaluate","differs","context","evaluated","evalPrecedence","andContext","s","slice","_SemanticContext2","_super2","sort","compareTo","PrecedencePredicate","checkParams","params","isCfg","state","alt","semanticContext","reachesIntoOuterContext","props","precedenceFilterSuppressed","ATNConfig","config","checkContext","stateNumber","Interval","INVALID_INTERVAL","IntervalSet","intervals","readOnly","addInterval","l","h","toAdd","clone","pos","existing","splice","min","max","forEach","current","next","toRemove","removeRange","contains","removeOne","n","x","replace","literalNames","symbolicNames","elemsAreChar","toTokenString","toCharString","toIndexString","names","String","fromCharCode","j","elementName","token","interval","acc","val","ATNState","atn","INVALID_STATE_NUMBER","stateType","ruleIndex","epsilonOnlyTransitions","transitions","nextTokenWithinRule","trans","index","isEpsilon","BASIC","RULE_START","BLOCK_START","PLUS_BLOCK_START","STAR_BLOCK_START","TOKEN_START","RULE_STOP","BLOCK_END","STAR_LOOP_BACK","STAR_LOOP_ENTRY","PLUS_LOOP_BACK","LOOP_END","serializationNames","RuleStopState","_ATNState","_possibleConstructorReturn","_assertThisInitialized","Transition","target","label","RANGE","RULE","PREDICATE","ATOM","ACTION","SET","NOT_SET","WILDCARD","PRECEDENCE","serializationTypes","EpsilonTransition","RangeTransition","RuleTransition","PredicateTransition","AtomTransition","ActionTransition","SetTransition","NotSetTransition","WildcardTransition","PrecedencePredicateTransition","_Transition","ruleStart","followState","serializationType","symbol","minVocabSymbol","maxVocabSymbol","addOne","_SetTransition","_get","_getPrototypeOf","AbstractPredicateTransition","ParseTree","_SyntaxTree","_Tree","SyntaxTree","Tree","RuleNode","_ParseTree","Error","TerminalNode","ErrorNode","_TerminalNode","Trees","toStringTree","tree","ruleNames","recog","getNodeText","escapeSpaces","escapeWhitespace","c","getChildCount","res","getChild","concat","t","altNumber","ruleContext","getAltNumber","payload","getPayload","getChildren","list","getAncestors","ancestors","getParent","findAllTokenNodes","ttype","findAllNodes","findAllRuleNodes","findTokens","nodes","_findAllNodes","descendants","RuleContext","_RuleNode","parent","invokingState","parentCtx","children","child","getText","visitor","visitChildren","isEmpty","ri","PredictionContext","cachedHashCode","EMPTY","getReturnState","EMPTY_RETURN_STATE","globalNodeCount","id","trace_atn_sim","ArrayPredictionContext","_PredictionContext","parents","returnStates","SingletonPredictionContext","returnState","up","EmptyPredictionContext","_SingletonPredictionC","HashMap","hashKey","entries","entry","oldValue","e","predictionContextFromRuleContext","transition","states","create","getCachedPredictionContext","contextCache","visited","changed","updated","merge","rootIsWildcard","mergeCache","previous","rootMerge","payloads","mergeRoot","spc","singleParent","apc","a_","mergeSingletons","mergedReturnStates","fill","mergedParents","a_parent","b_parent","M","uniqueParents","containsKey","q","combineCommonParents","mergeArrays","BitSet","hashStuff","LL1Analyzer","look","lookBusy","_LOOK","HIT_PRED","stopState","ctx","lookContext","calledRuleStack","seeThruPreds","addEOF","has","removed","remove","constructor","newContext","addRange","maxTokenType","complement","addSet","ATN","grammarType","decisionToState","ruleToStartState","ruleToStopState","modeNameToStartState","ruleToTokenType","lexerActions","modeToStartState","LOOK","nextTokensInContext","nextTokensNoContext","decision","following","nextTokens","expected","rt","INVALID_ALT_NUMBER","BasicState","DecisionState","nonGreedy","BlockStartState","_DecisionState","endState","BlockEndState","startState","LoopEndState","loopBackState","RuleStartState","isPrecedenceRule","TokensStartState","PlusLoopbackState","StarLoopbackState","StarLoopEntryState","isPrecedenceDecision","PlusBlockStartState","_BlockStartState","StarBlockStartState","BasicBlockStartState","label_","makeLabel","actionIndex","isCtxDependent","outermostPrecedenceReturn","Predicate","predIndex","localctx","sempred","_AbstractPredicateTra","precpred","ATNDeserializationOptions","copyFrom","verifyATN","generateRuleBypassTransitions","defaultOptions","LexerAction","action","actionType","isPositionDependent","LexerSkipAction","_LexerAction","lexer","skip","INSTANCE","LexerChannelAction","_channel","LexerCustomAction","LexerMoreAction","more","LexerTypeAction","LexerPushModeAction","mode","pushMode","LexerPopModeAction","popMode","LexerModeAction","initArray","tmp","ATNDeserializer","options","deserializationOptions","stateFactories","actionFactories","legacy","reset","checkVersion","skipUUID","readATN","readStates","readRules","readModes","sets","readSets","readInt","bind","readInt32","readEdges","readDecisions","readLexerActions","markPrecedenceDecisions","SERIALIZED_VERSION","temp","split","version","pair","loopBackStateNumbers","endStateNumbers","nstates","stype","stateFactory","loopBackStateNumber","endStateNumber","addState","numNonGreedyStates","numPrecedenceStates","nrules","tokenType","nmodes","reader","m","iset","i1","i2","nedges","src","trg","arg1","arg2","arg3","edgeFactory","addTransition","ndecisions","decState","data1","data2","lexerActionFactory","generateRuleBypassTransition","idx","bypassStart","bypassStop","defineDecisionState","excludeTransition","stateIsEndStateFor","matchState","maybeLoopEndState","checkCondition","condition","message","sf","af","ErrorListener","recognizer","offendingSymbol","msg","dfa","startIndex","stopIndex","exact","ambigAlts","configs","conflictingAlts","prediction","ConsoleErrorListener","_ErrorListener","error","ProxyErrorListener","delegates","syntaxError","reportAmbiguity","reportAttemptingFullContext","reportContextSensitivity","Recognizer","_listeners","_interp","_stateNumber","toolVersion","runtimeVersion","listener","getPrototypeOf","tokenNames","getLiteralNames","getSymbolicNames","getTokenNames","tokenTypeMapCache","ruleIndexMapCache","tokenName","getTokenTypeMap","getOffendingToken","CommonToken","_Token","EMPTY_SOURCE","txt","input","getInputStream","size","CommonTokenFactory","_TokenFactory","copyText","TokenFactory","DEFAULT","RecognitionException","_Error","captureStackTrace","offendingToken","offendingState","getExpectedTokens","_wrapNativeSuper","LexerNoViableAltException","_RecognitionException","deadEndConfigs","Lexer","_Recognizer","_input","_factory","_tokenFactorySourcePair","_token","_tokenStartCharIndex","_tokenStartLine","_tokenStartColumn","_hitEOF","_type","_modeStack","_mode","DEFAULT_MODE","seek","tokenStartMarker","mark","emitEOF","continueOuter","SKIP","match","stack","notifyListeners","recover","LA","MORE","emit","release","debug","pop","getCharIndex","emitToken","cpos","lpos","eof","tokens","nextToken","getErrorDisplay","getErrorListenerDispatch","getErrorDisplayForChar","re","consume","sourceName","hashATNConfig","hashCodeForConfigSet","equalATNConfigs","equalsForConfigSet","DEFAULT_TOKEN_CHANNEL","HIDDEN","MIN_CHAR_VALUE","MAX_CHAR_VALUE","ATNConfigSet","fullCtx","configLookup","uniqueAlt","hasSemanticContext","dipsIntoOuterContext","merged","preds","interpreter","getCachedContext","coll","containsFast","DFAState","edges","isAcceptState","lexerActionExecutor","requiresFullContext","predicates","alts","ATNSimulator","sharedContextCache","ERROR","OrderedATNConfigSet","_ATNConfigSet","LexerATNConfig","_ATNConfig","passedThroughNonGreedyDecision","checkNonGreedyDecision","LexerIndexedCustomAction","offset","execute","LexerActionExecutor","updatedLexerActions","requiresSeek","lexerAction","numActions","resetSimState","sim","dfaState","SimState","LexerATNSimulator","_ATNSimulator","decisionToDFA","prevAccept","simulator","s0","matchATN","execATN","old_mode","s0_closure","computeStartState","suppressEdge","addDFAState","predict","toLexerString","ds0","captureSimState","getExistingTargetState","computeTargetState","failOrAccept","MIN_DFA_EDGE","MAX_DFA_EDGE","reach","getReachableConfigSet","items","addDFAEdge","accept","closure","skipAlt","cfg","currentAltReachedAcceptState","getTokenName","getReachableTarget","fixOffsetBeforeMatch","treatEofAsEpsilon","charPos","matches","initialContext","speculative","hasEmptyPath","getEpsilonTarget","evaluatePredicate","append","savedcolumn","savedLine","marker","settings","from_","tk","to","cfgs","proposed","firstConfigWithRuleStopState","newState","setReadonly","tt","dfa_debug","PredPrediction","pred","AltDict","PredictionMode","SLL","LL","LL_EXACT_AMBIG_DETECTION","hasSLLConflictTerminatingPrediction","allConfigsInRuleStopStates","dup","altsets","getConflictingAltSubsets","hasConflictingAltSet","hasStateAssociatedWithOneAlt","hasConfigInRuleStopState","resolvesToJustOneViableAlt","getSingleViableAlt","allSubsetsConflict","hasNonConflictingAltSet","allSubsetsEqual","first","getUniqueAlt","all","getAlts","minValue","or","configToAlts","getValues","getStateToAltMap","minAlt","NoViableAltException","startToken","_ctx","getCurrentToken","DoubleDict","defaultMapCtor","cacheMap","ParserATNSimulator","predictionMode","_startIndex","_outerContext","_dfa","debug_closure","debug_add","retry_debug","getLookaheadName","LT","precedenceDfa","getPrecedenceStartState","getPrecedence","atnStartState","applyPrecedenceFilter","setPrecedenceStartState","previousD","D","noViableAlt","getSynValidOrSemInvalidAltThatFinishedDecisionEntryRule","conflictIndex","evalSemanticContext","execATNWithFullContext","computeReachSet","predictedAlt","altSubSets","getConflictingAlts","predicateDFAState","getDecisionState","decisionState","nalts","altsToCollectPredsFrom","getConflictingAltsOrUniqueAlt","altToPred","getPredsForAmbigAlts","getPredicatePredictions","foundExactAmbig","intermediate","skippedStopStates","closureBusy","removeAllConfigsNotInRuleStopState","lookToEndOfRule","endOfRuleState","statesFromAlt1","configSet","updatedContext","orContext","nPredAlts","pairs","containsPredicate","splitAccordingToSemanticValidity","semValidConfigs","semInvalidConfigs","getAltThatFinishedDecisionEntryRule","indexOf","succeeded","failed","predPredictions","complete","predictions","predicateEvaluationResult","collectPredicates","closureCheckingStopState","depth","parms","getRuleName","closure_","canDropLoopEntryEdgeInLeftRecursiveRule","continueCollecting","newDepth","numCtxs","blockEndStateNum","blockEndState","returnStateNumber","returnStateTarget","inContext","ruleTransition","precedenceTransition","predTransition","actionTransition","pt","getRuleInvocationStack","currentPosition","predSucceeds","getPredicate","newSemCtx","getTokens","nvae","decs","getDeadEndConfigs","optimizeConfigs","getTokenStream","PredictionContextCache","cache","DFASerializer","buf","sortedStates","getStateString","getEdgeLabel","baseStateStr","LexerDFASerializer","_DFASerializer","DFA","_states","precedenceState","ParseTreeListener","node","ParseTreeVisitor","visit","ParseTreeWalker","isErrorNode","visitErrorNode","visitTerminal","enterRule","walk","exitRule","enterEveryRule","exitEveryRule","InputMismatchException","FailedPredicateException","predicate","formatMessage","predicateIndex","DiagnosticErrorListener","exactOnly","getDecisionDescription","notifyErrorListeners","ruleName","reportedAlts","ParseCancellationException","DefaultErrorStrategy","_ErrorStrategy","errorRecoveryMode","lastErrorIndex","lastErrorStates","nextTokensContext","nextTokenState","endErrorCondition","inErrorRecoveryMode","beginErrorCondition","reportNoViableAlternative","reportInputMismatch","reportFailedPredicate","name","getMessage","followSet","getErrorRecoverySet","consumeUntil","la","nextTokensState","singleTokenDeletion","reportUnwantedToken","expecting","whatFollowsLoopIterationOrRule","escapeWSAndQuote","getTokenErrorDisplay","matchedSymbol","singleTokenInsertion","getMissingSymbol","currentSymbolType","reportMissingToken","nextTokenType","reportMatch","tokenText","currentSymbol","expectedTokenType","lookback","getTokenFactory","recoverSet","follow","ErrorStrategy","BailErrorStrategy","_DefaultErrorStrategy","exception","CharStream","decodeToUnicodeCodePoints","strdata","_index","codePoint","codePointAt","_size","fromCodePoint","InputStream","_CharStream","isNode","process","versions","FileStream","_InputStream","fileName","encoding","fs","path","callback","err","is","fromString","str","fromBlob","blob","onLoad","onError","window","FileReader","onload","onerror","readAsText","fromBuffer","buffer","fromPath","fromPathSync","stringToCharArray","Uint16Array","BufferedTokenStream","_TokenStream","tokenSource","fetchedEOF","lazyInit","adjustSeekIndex","sync","fetch","types","subset","LB","setup","nextOnChannel","nextTokenOnChannel","filterForChannel","prevOnChannel","previousTokenOnChannel","left","right","hidden","getSourceName","TokenStream","CommonTokenStream","_BufferedTokenStream","TraceListener","_ParseTreeListener","Parser","_errHandler","_precedenceStack","buildParseTrees","_tracer","_parseListeners","_syntaxErrors","setInputStream","setTrace","recoverInline","addErrorNode","reverse","factory","serializedAtn","getSerializedATN","bypassAltsAtnCache","deserialize","setTokenStream","hasListener","addTokenNode","addChild","addContextToParseTree","triggerEnterRuleEvent","triggerExitRuleEvent","altNum","setAltNumber","removeLastChild","retCtx","parseListeners","getParseListeners","getRuleIndexMap","seenOne","printer","println","print","trace","removeParseListener","addParseListener","TerminalNodeImpl","ErrorNodeImpl","_TerminalNodeImpl","ParserRuleContext","_RuleContext","invokingStateNumber","badToken","ctxType","contexts","TokenStreamRewriter","programs","Map","tokenOrIndex","programName","DEFAULT_PROGRAM_NAME","rewrites","getProgram","op","InsertAfterOp","InsertBeforeOp","RangeError","ReplaceOp","initializeProgram","intervalOrProgram","indexToOp","reduceToSingleOperationPerIndex","_step","_iterator","_createForOfIteratorHelper","done","f","_step2","rop","_iterator2","getKindOfOps","iop","instructionIndex","lastIndex","_step3","_iterator3","prevRop","disjoint","_step4","_iterator4","prevIop","catOpText","_step5","_iterator5","_step6","_iterator6","y","kind","before","RewriteOperation","opName","$index","substring","_RewriteOperation","_InsertBeforeOp","_RewriteOperation2","_super3","misc","CharStreams","Utils"],"sourceRoot":""}